/* 右侧 SepAgent 智能体栏：头部、推理模型与档位、计划流水线（较早的记录是十个阶段）、时间线、决策坞、“现在 / 下一步 / 为什么”、输入框、案例库。 */
.ag-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border-left: 1px solid var(--line); border-top: 1px solid var(--line-soft); }
.ag-sp { flex: 1; min-width: 0; }

/* 头部 */
.ag-head { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 6px 0 10px; border-bottom: 1px solid var(--line-soft); flex: none; }
.ag-title { font-size: var(--fs-md); font-weight: 600; color: var(--ink); white-space: nowrap; }
.ag-pill { height: 18px; padding: 0 7px; border-radius: 9px; border: 1px solid var(--brand-edge); background: var(--brand-soft); color: var(--brand); font-size: var(--fs-xs); white-space: nowrap; }
.ag-pill:hover { background: #e2e6ff; border-color: var(--brand); }
.ag-hb { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink2); }
.ag-hb:hover { background: var(--hover); border-color: var(--hover-edge); }

/* 推理模型与档位 */
.ag-row2 { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-bottom: 1px solid var(--line-soft); flex: none; }
.ag-brain {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; max-width: 54%; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--field); font-size: var(--fs-sm); color: var(--ink); white-space: nowrap;
}
.ag-brain:hover { border-color: var(--accent); }
.ag-brain .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-brain .ic { color: var(--ink3); }
.ag-dot { width: 7px; height: 7px; border-radius: 50%; background: #2c9a45; flex: none; }
.ag-dot.off { background: var(--ink4); }
.ag-mlbl { font-size: var(--fs-xs); color: var(--ink3); }
.ag-modes { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); overflow: hidden; flex: none; }
.ag-modes button { height: 20px; padding: 0 8px; border: none; border-right: 1px solid var(--line-soft); background: none; font-size: var(--fs-sm); color: var(--ink2); white-space: nowrap; }
.ag-modes button:last-child { border-right: none; }
.ag-modes button:hover { background: var(--hover); }
.ag-modes button.on { background: var(--sel); color: var(--accent-ink); }
.ag-modes button.on:last-child { background: var(--brand-soft); color: var(--brand); }

/* 流水线 */
.ag-pipe { padding: 6px 8px 5px; border-bottom: 1px solid var(--line-soft); flex: none; background: var(--panel); }
.fl-stages { display: flex; flex-wrap: wrap; gap: 3px; }
.fl-st {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: var(--r-sm); font-size: 10.5px; line-height: 1;
  border: 1px solid var(--line-soft); background: var(--field); color: var(--ink4); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.fl-st.done { color: var(--success); border-color: var(--success-edge); background: #f1faf0; }
.fl-st.running { color: #fff; background: var(--accent); border-color: var(--accent); }
.fl-st.failed { color: var(--danger); border-color: var(--danger-edge); background: var(--danger-bg); }
.fl-st.skipped { color: var(--ink3); border-style: dashed; }
.fl-st.repaired { color: var(--warning-ink); border-color: var(--warning-edge); background: var(--warning-bg); }
.fl-st.g { font-weight: 600; color: var(--brand); border-color: var(--brand-edge); background: var(--field); border-style: dashed; }
.fl-st.g.passed { background: var(--brand-soft); border-style: solid; }
.fl-st.g.waiting { background: var(--brand); color: #fff; border-color: var(--brand); border-style: solid; animation: pulseb 1.8s infinite; }
.fl-st.g.failed { color: var(--danger); border-color: var(--danger-edge); background: var(--danger-bg); border-style: solid; }
/* 回放时流水线每一步可点：跳到这一步 */
button.fl-st.jump { cursor: pointer; font-family: inherit; transition: box-shadow 0.12s, transform 0.12s; }
button.fl-st.jump:hover, button.fl-st.jump:focus-visible { box-shadow: 0 0 0 2px var(--brand-edge); transform: translateY(-1px); outline: none; }
.fl-meta { margin-top: 4px; font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-meta.running { color: var(--accent-ink); }
.fl-meta.waiting { color: var(--brand); }

/* 时间线 */
.ag-tl { flex: 1; min-height: 120px; overflow: auto; background: var(--field); }
.ag-tli { padding: 0 10px 10px; }
.ag-req { padding: 8px 0 6px; border-bottom: 1px solid var(--line-soft); background: var(--field); }
.ag-req.stick { position: sticky; top: 0; z-index: 2; }
.ag-req-t { font-size: var(--fs-md); font-weight: 600; line-height: 1.5; color: var(--ink); max-height: 7.6em; overflow: auto; cursor: pointer; border-radius: var(--r-sm); }
.ag-req-t.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: none; }
.ag-req-t:hover { color: var(--accent-ink); }
.ag-req.stick { box-shadow: 0 3px 4px -3px rgba(0, 0, 0, 0.12); }
.ag-req-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; font-size: var(--fs-xs); color: var(--ink3); }
.ag-req-m > span:first-child { margin-right: 2px; }
.ag-chip {
  display: inline-flex; align-items: center; gap: 3px; height: 17px; padding: 0 5px; border-radius: var(--r-sm); border: 1px solid var(--line-soft);
  background: var(--sunken); color: var(--ink2); font-size: var(--fs-xs); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.ag-chip.wait { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-edge); }
.ag-chip.tone { background: #e5f5f8; color: #16788f; border-color: #b4dfe8; }
.ag-chip.btn { height: 20px; background: var(--field); border-color: var(--line); color: var(--ink2); }
.ag-chip.btn:hover { background: var(--hover); border-color: var(--hover-edge); }
.ag-chip.btn .ic { color: var(--icon); }
.ag-chip.btn.wait { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-edge); }
.ag-chip.btn.wait .ic { color: var(--brand); }
.ag-note { margin: 6px 0 0; padding: 4px 7px; font-size: var(--fs-xs); color: var(--caution-ink); background: var(--caution-bg); border: 1px solid var(--caution-edge); border-radius: var(--r-sm); line-height: 1.5; }
.ag-note.err { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }

.ag-run { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px; padding-top: 8px; }
.ag-gut { display: flex; justify-content: center; padding-top: 1px; position: relative; }
.ag-gut::after { content: ''; position: absolute; top: 20px; bottom: -4px; left: 8.5px; width: 1px; background: var(--line-soft); }
.ag-body { min-width: 0; }
.ag-meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink3); margin-bottom: 4px; }
.ag-meta b { color: var(--ink); font-size: var(--fs-sm); }
.ag-st { margin-left: auto; padding: 0 5px; border-radius: var(--r-sm); line-height: 15px; border: 1px solid var(--line-soft); }
.ag-st.running { color: var(--accent-ink); background: var(--info-bg); border-color: var(--info-edge); }
.ag-st.waiting { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-edge); }
.ag-st.done { color: var(--ink2); }

.ag-step { margin: 0 0 6px; }
.ag-proc-h { display: flex; align-items: center; gap: 6px; height: 21px; font-size: var(--fs-sm); }
.ag-proc-h .sn { font-size: 10.5px; color: var(--ink3); font-variant-numeric: tabular-nums; width: 22px; flex: none; }
.ag-proc-h .nm { font-weight: 600; color: var(--ink); }
.ag-proc-h .sm { font-size: var(--fs-xs); }
.ag-proc-h .sm.done { color: var(--success); }
.ag-proc-h .sm.running { color: var(--accent); }
.ag-proc-h .sm.failed { color: var(--danger); }
.ag-proc-h .sm.skipped { color: var(--ink3); }
.ag-proc-h .sm.repaired { color: var(--warning-ink); }
.ag-proc-h .r { margin-left: auto; font-size: var(--fs-xs); color: var(--ink3); font-variant-numeric: tabular-nums; }
.ag-step.s-running .ag-proc-h .nm { color: var(--accent-ink); }
.ag-step.s-pending .ag-proc-h .nm, .ag-step.s-skipped .ag-proc-h .nm { color: var(--ink3); font-weight: 400; }
.ag-sum { margin: 0 0 2px 28px; font-size: var(--fs-xs); color: var(--ink2); line-height: 1.5; }
.ag-step > .ag-pr, .ag-step > .ag-diag, .ag-step > .ag-text, .ag-step > .ag-solv, .ag-step > .ag-gmark { margin-left: 28px; }
.ag-pr { display: flex; align-items: baseline; gap: 5px; padding: 1px 0; font-size: var(--fs-xs); color: var(--ink2); line-height: 1.5; min-width: 0; }
.ag-pr .ic { align-self: center; color: var(--ink3); }
.ag-pr .tn { color: var(--ink); white-space: nowrap; font-family: var(--mono); font-size: 10.5px; }
.ag-pr .ta { color: var(--ink3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pr .r { margin-left: auto; color: var(--ink3); white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 6px; }
.ag-pr.tool .ic { color: var(--c-teal); }
.ag-pr.log.warn { color: var(--warning-ink); }
.ag-pr.log.error { color: var(--danger); }
.ag-pr.dec { display: block; padding: 3px 6px; margin-top: 2px; margin-bottom: 2px; border-left: 2px solid var(--accent); background: var(--panel); }
.ag-pr.dec .d1 { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.ag-pr.dec .w { color: var(--ink3); }
.ag-pr.dec .eq { color: var(--ink4); }
.ag-pr.dec b { color: var(--ink); font-weight: 600; font-size: var(--fs-sm); word-break: break-word; }
.ag-pr.dec .src { margin-left: auto; }
.ag-pr.dec .d2 { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-pr.val .ic { color: var(--success); }
.ag-pr.val.bad { color: var(--danger); }
.ag-pr.val.bad .ic { color: var(--danger); }
.ag-pr.sv .tst { align-self: center; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ag-solv { padding: 2px 0 2px 6px; border-left: 2px solid var(--c-orange); margin-top: 2px; margin-bottom: 2px; }
.ag-diag { margin-top: 3px; margin-bottom: 3px; padding: 4px 7px; border: 1px solid var(--warning-edge); background: #fffaea; border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: 1.55; }
.ag-diag b { font-weight: 400; color: var(--warning-ink); margin-right: 5px; }
.ag-diag .kid { margin-left: 5px; }
.ag-text { font-size: var(--fs-sm); color: var(--ink); line-height: 1.6; margin: 3px 0; white-space: pre-wrap; }
.ag-llm { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 3px; font-size: 11px; line-height: 16px; vertical-align: 1px; background: #eef1ff; color: #3341b8; }
.ag-llm.jw { background: #e8f0fb; color: #2a5bb4; }
.ag-gmark {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; margin-bottom: 4px; padding: 3px 7px; border-radius: var(--r-sm);
  border: 1px dashed var(--brand-edge); background: var(--field); font-size: var(--fs-xs); color: var(--ink2);
}
.ag-gmark .gt { font-weight: 600; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-edge); border-radius: var(--r-sm); padding: 0 3px; line-height: 14px; flex: none; }
.ag-gmark .gx { color: var(--ink); flex: none; white-space: nowrap; }
.ag-gmark .gs { color: var(--ink3); min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-gmark.waiting { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.ag-gmark.approve, .ag-gmark.revise, .ag-gmark.signoff { border-style: solid; background: #f6f7ff; }
.ag-gmark.stop { border-style: solid; border-color: var(--danger-edge); background: var(--danger-bg); }
.ag-done { margin: 6px 0 2px; padding: 4px 8px; font-size: var(--fs-sm); border-radius: var(--r-sm); background: var(--success-bg); color: var(--success); border: 1px solid var(--success-edge); }
.ag-done.failed { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-edge); }
.ag-done.infeasible { background: var(--caution-bg); color: var(--caution-ink); border-color: var(--caution-edge); }
.ag-done.stopped { background: var(--sunken); color: var(--ink2); border-color: var(--line); }

/* 空白页与案例库 */
.ag-blank { padding: 14px 2px 6px; font-size: var(--fs-sm); color: var(--ink2); line-height: 1.65; }
.ag-blank-t { font-size: var(--fs-xl); font-weight: 300; color: var(--ink); margin-bottom: 4px; }
.ag-blank p { margin: 4px 0; }
.ag-blank b { font-weight: 400; color: var(--ink); }
.fl-gallery { padding: 4px 0 6px; }
.fl-gallery .gh { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); padding: 6px 0 2px; border-bottom: 1px solid var(--line-soft); }
.fl-gallery .gh span { font-weight: 400; font-size: var(--fs-xs); color: var(--ink3); }
.fl-gallery .gl { display: flex; align-items: center; gap: 6px; margin: 8px 0 3px; font-size: var(--fs-xs); color: var(--ink3); }
.fl-cases { display: flex; flex-direction: column; gap: 3px; }
.fl-case { display: flex; align-items: stretch; border: 1px solid var(--card-edge); border-radius: var(--r-sm); background: var(--field); }
.fl-case:hover { border-color: var(--hover-edge); background: #f7fbff; }
.fl-case.bad { border-color: #f3d6c4; }
.fc-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; padding: 4px 6px; border: none; background: none; text-align: left; }
.fc-main .no { grid-row: 1 / span 2; font-size: 10.5px; color: var(--ink3); padding-top: 1px; font-variant-numeric: tabular-nums; }
.fc-main .fc-t { font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-main .fc-x { font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-run { width: 28px; flex: none; display: flex; align-items: center; justify-content: center; border: none; border-left: 1px solid var(--line-soft); background: none; color: var(--c-green); }
.fc-run:hover { background: var(--hover); color: #3c8f2f; }
.fl-case.bad .fc-run { color: var(--caution); }

/* 决策坞 */
.ag-foot { flex: 0 1 auto; min-height: 96px; max-height: 56%; overflow: hidden; padding: 6px 8px; border-top: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
/* 卡片头和操作行固定，中间内容超高时在卡片内滚动（小屏也能看到“批准 / 签发”按钮） */
.ag-foot > .ag-gate { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
.ag-foot > .ag-gate > .ag-gh { flex: none; }
.ag-foot > .ag-gate > .ag-gb { overflow: auto; min-height: 0; flex: 0 1 auto; }
.ag-gfoot { flex: none; padding: 6px 8px 8px; border-top: 1px solid var(--line-soft); background: var(--field); border-radius: 0 0 var(--r) var(--r); }
.ag-gfoot .ag-reason { margin-bottom: 0; }
.ag-gfoot .ag-gact { margin-top: 6px; }
.ag-gfoot > .ag-gact:first-child { margin-top: 0; }
.ag-gate { border: 1px solid var(--brand-edge); border-radius: var(--r); background: var(--field); box-shadow: 0 1px 3px rgba(0, 20, 220, 0.08); }
.ag-gate.plan { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft), 0 2px 8px rgba(0, 20, 220, 0.10); }
.ag-gate.r2 { border-color: var(--caution-edge); box-shadow: none; }
.ag-gate.back { border-color: var(--line); box-shadow: none; }
.ag-gate.done { border-color: var(--success-edge); box-shadow: none; }
.ag-gh {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 8px; border-bottom: 1px solid var(--brand-edge); background: var(--brand-soft);
  font-size: var(--fs-sm); font-weight: 600; color: var(--brand); border-radius: var(--r) var(--r) 0 0; white-space: nowrap;
}
.ag-gh > span:not(.ag-sp):not(.gid):not(.w) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-gate.r2 .ag-gh { background: var(--caution-bg); color: var(--caution-ink); border-bottom-color: var(--caution-edge); }
.ag-gate.back .ag-gh { background: var(--sunken); color: var(--ink2); border-bottom-color: var(--line-soft); }
.ag-gate.done .ag-gh { background: var(--success-bg); color: var(--success); border-bottom-color: var(--success-edge); }
.ag-gh .gid { font-size: 10.5px; font-weight: 600; padding: 0 4px; line-height: 15px; border-radius: var(--r-sm); background: var(--brand); color: #fff; flex: none; }
.ag-gate.done .ag-gh .gid { background: var(--success); }
.ag-gh .w { font-weight: 400; font-size: var(--fs-xs); color: var(--ink2); font-variant-numeric: tabular-nums; flex: none; }
.ag-gh .pg { height: 18px; padding: 0 5px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); font-size: var(--fs-xs); color: var(--ink2); flex: none; }
.ag-gb { padding: 7px 8px 8px; font-size: var(--fs-sm); }
.ag-gt { color: var(--ink); line-height: 1.55; }
.ag-gwhy { color: var(--ink2); line-height: 1.6; font-size: var(--fs-xs); margin: 2px 0 4px; }
.ag-gwhy b { color: var(--ink); }
.ag-items { margin: 6px 0 2px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.ag-it { display: flex; align-items: baseline; gap: 6px; padding: 2px 6px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-xs); }
.ag-it:last-child { border-bottom: none; }
.ag-it .w { color: var(--ink3); white-space: nowrap; flex: none; max-width: 42%; overflow: hidden; text-overflow: ellipsis; }
.ag-it b { color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ag-it .src { margin-left: auto; flex: none; }
.ag-edit { margin-top: 6px; }
.ag-edit-h { font-size: var(--fs-xs); color: var(--ink3); margin-bottom: 3px; }
.ag-ef { display: inline-flex; align-items: center; gap: 5px; margin: 0 8px 4px 0; font-size: var(--fs-xs); color: var(--ink2); }
.ag-ef input { width: 74px; height: 22px; font-variant-numeric: tabular-nums; }
.ag-ef.ch span { color: var(--brand); }
.ag-ef.ch input { border-color: var(--brand); background: var(--brand-soft); }
/* 越界提示（只提示不拦）与利旧锁定 */
.ag-ef.warn input { border-color: var(--warning); background: var(--warning-bg); }
.ag-ef.lk input { border-style: dashed; border-color: var(--ink3); background: var(--surface-2, #f4f5f7); color: var(--ink); }
.ag-lk { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: -3px; padding: 0; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink3); cursor: pointer; opacity: .55; }
.ag-lk:hover { opacity: 1; border-color: var(--line-soft); }
.ag-lk.on { opacity: 1; color: var(--ink); background: var(--warning-bg); border-color: var(--warning-edge); }
.ag-ewarn, .ag-elock { margin: 2px 0 4px; font-size: var(--fs-xs); line-height: 1.5; }
.ag-ewarn > div, .ag-elock { display: flex; align-items: center; gap: 5px; }
.ag-ewarn { color: var(--warning-ink); }
.ag-ewarn .kid { margin-left: 2px; }
.ag-elock { color: var(--ink2); }
.ag-gcons { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; margin: 6px 0 5px; font-size: var(--fs-xs); color: var(--ink2); }
.ag-gcons b { color: var(--ink); font-weight: 600; }
.ag-reason { width: 100%; height: 24px; margin-bottom: 6px; font-size: var(--fs-sm); }
.ag-gact { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.ag-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 26px; padding: 0 12px; border: 1px solid #c5c7cb;
  border-radius: var(--r-sm); background: #fdfdfd; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap;
}
.ag-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.ag-btn:disabled { color: var(--ink4); background: var(--sunken); border-color: var(--line-soft); }
.ag-btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.ag-btn.pri:hover:not(:disabled) { background: #0010b0; border-color: #0010b0; }
.ag-btn.pri:disabled { background: #9aa3e8; border-color: #9aa3e8; color: #fff; }
.ag-btn.pri.lock { background: #c9cef5; border-color: #c9cef5; }
.ag-btn.ghost { background: none; border-color: transparent; }
.ag-btn.danger { color: var(--danger); }
.ag-btn.danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger-edge); }
.ag-btn.sm { height: 22px; padding: 0 9px; font-size: var(--fs-xs); }
.ag-alt { padding: 6px 0 7px; border-bottom: 1px solid var(--line-soft); }
.ag-alt:last-of-type { border-bottom: none; }
.ag-alt .t { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.ag-alt .t .no { width: 16px; height: 16px; border-radius: 50%; background: var(--caution); color: #fff; font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 400; }
.ag-alt .x { color: var(--ink2); font-size: var(--fs-xs); margin: 2px 0 3px 22px; line-height: 1.55; }
.ag-alt .q { margin-left: 22px; padding: 3px 6px; font-size: var(--fs-xs); color: var(--ink2); background: var(--sunken); border-left: 2px solid var(--caution-edge); line-height: 1.5; }
.ag-alt .ag-gact { margin-left: 22px; }
.ag-hintline { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink3); line-height: 1.5; }
.ag-gf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 8px; align-items: center; margin: 6px 0 4px; font-size: var(--fs-xs); color: var(--ink2); }
.ag-gf input { height: 24px; width: 100%; font-size: var(--fs-sm); }

/* 现在 / 下一步 / 为什么 */
.ag-now { flex: none; padding: 5px 10px; border-top: 1px solid var(--line-soft); background: var(--panel); font-size: var(--fs-xs); }
.ag-now[data-state="wait"] { background: var(--brand-soft); border-top-color: var(--brand-edge); }
.ag-now[data-state="run"] { background: #f2f8fd; }
.ag-now .l { display: flex; align-items: center; gap: 8px; min-height: 19px; }
.ag-now .k { width: 40px; flex: none; color: var(--ink3); }
.ag-now .v { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); display: flex; align-items: center; gap: 5px; }
.ag-now[data-state="wait"] .l:first-child .v { color: var(--brand); font-weight: 600; }
.ag-now .l.idle .v { color: var(--ink3); }
.ag-idot { width: 7px; height: 7px; border-radius: 50%; background: #2c9a45; flex: none; }
.spin { width: 10px; height: 10px; border: 1.6px solid var(--accent); border-right-color: transparent; border-radius: 50%; display: inline-block; flex: none; animation: spin 0.9s linear infinite; }
.ag-stop {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border: 1px solid var(--danger-edge); border-radius: var(--r-sm);
  background: var(--field); color: var(--danger); font-size: var(--fs-xs); flex: none;
}
.ag-stop i { width: 7px; height: 7px; background: var(--danger); display: inline-block; }
.ag-stop:hover:not(:disabled) { background: var(--danger-bg); }
.ag-stopping { color: var(--ink3); flex: none; }

/* 输入框 */
.ag-comp { flex: none; padding: 6px 8px 5px; border-top: 1px solid var(--line-soft); background: var(--panel); }
.ag-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--field); }
.ag-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ag-ta { display: block; width: 100%; min-height: 40px; max-height: 160px; height: 46px; resize: none; border: none; padding: 6px 8px 2px; font-size: var(--fs-md); line-height: 1.5; background: none; }
.ag-ta:focus { box-shadow: none; }
.ag-crow { display: flex; align-items: center; gap: 4px; padding: 3px 5px 5px; }
.ag-send {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 11px; border: 1px solid var(--brand); border-radius: var(--r-sm);
  background: var(--brand); color: #fff; font-size: var(--fs-sm);
}
.ag-send:hover { background: #0010b0; }
.ag-send.off { background: #c9cef5; border-color: #c9cef5; }
.ag-hint { margin-top: 3px; font-size: 10.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes pulseb {
  0% { box-shadow: 0 0 0 0 rgba(0, 20, 220, 0.35); }
  70% { box-shadow: 0 0 0 5px rgba(0, 20, 220, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 20, 220, 0); }
}

@media (max-width: 1500px) {
  .ag-modes button { padding: 0 6px; }
  .ag-mlbl { display: none; }
}
