/* Research mentor: conversation in the centre, 任务 and 研究记录 on the right. */
.mentor-host { flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface-subtle, #f7f7f4); }
/* The mentor replaces the document and the old assistant column: one conversation, one lead (ADR 0001). */
.mentor-host[hidden], .workspace[data-app-view="mentor"] .document-workspace, .workspace[data-app-view="mentor"] #assistant-panel,
.workspace[data-app-view="mentor"] #resize-assistant, .workspace[data-app-view="mentor"] #toggle-assistant { display: none !important; }
@media (max-width: 900px) { .workspace[data-app-view="mentor"][data-panel="files"] .mentor-host { display: none; } }
.mentor-page { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.mentor-main { min-width: 0; display: flex; flex-direction: column; padding: 22px 28px 16px; gap: 12px; overflow: hidden; }
.mentor-heading { display: grid; gap: 4px; }
.mentor-heading h1 { margin: 0; font-size: 22px; }
.mentor-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.mentor-eyebrow { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.mentor-brief-chip { justify-self: start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.mentor-brief-chip.ok { background: #e7f2e8; border-color: #bcd8c0; }
.mentor-brief-chip.todo { background: #fff6e0; border-color: #ecd9a5; }
.mentor-thread { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding-right: 6px; }
.mentor-message { display: grid; gap: 6px; max-width: 760px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.mentor-message.user { justify-self: end; background: #eef3ec; }
.mentor-message p { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.mentor-author { font-size: 12px; font-weight: 600; color: var(--muted); }
.mentor-why summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.mentor-why p { font-size: 13px; color: var(--muted); }
.mentor-model { font-size: 11px; }
.mentor-card { display: grid; gap: 6px; justify-items: start; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--canvas, #f6f7f3); }
.mentor-card ul, .mentor-card ol { margin: 0; padding-left: 20px; }
.mentor-label { font-size: 12px; color: var(--muted); }
.mentor-budget { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mentor-budget input { width: 70px; }
.mentor-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #eef1fb; font-size: 13px; }
.mentor-compose { display: grid; gap: 8px; }
.mentor-compose textarea { width: 100%; resize: vertical; }
.mentor-compose .row { justify-content: flex-end; gap: 8px; }
.mentor-side { border-left: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.mentor-tabs { display: flex; gap: 4px; padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
.mentor-tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; }
.mentor-tabs button[aria-selected="true"] { border-bottom-color: var(--ink); font-weight: 600; }
.mentor-side-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; align-content: start; gap: 8px; }
.mentor-task, .mentor-record { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.mentor-task.done strong { text-decoration: line-through; color: var(--muted); }
.mentor-task.running { border-color: #9fb9e8; }
.mentor-pending { color: #8a5a00; }
.mentor-record-body { max-height: 60vh; overflow: auto; }
@media (max-width: 900px) { .mentor-page { grid-template-columns: 1fr; } .mentor-side { border-left: none; border-top: 1px solid var(--line); max-height: 40vh; } }

.mentor-model-picker { max-width: 240px; margin-right: auto; font-size: 13px; padding: 5px 8px; border-radius: 7px; }
.model-settings-advanced { margin-top: 18px; }
.model-settings-advanced > summary { cursor: pointer; color: #5b6b5f; }
.mentor-command-list { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mentor-pre { white-space: pre-wrap; }
.mentor-thread-bar { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.mentor-thread-title { font-size: 14px; }
.mentor-thread-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.mentor-thread-tools button { font-size: 12px; padding: 3px 9px; }
.mentor-summary summary, .mentor-thinking summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.mentor-summary p, .mentor-thinking p { font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 40vh; overflow: auto; }
.mentor-thinking { border-left: 2px solid var(--line); padding-left: 8px; }
.mentor-search { display: grid; gap: 4px; }
.mentor-search-hit { text-align: left; font-size: 12px; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.mentor-message-head { display: flex; align-items: center; gap: 8px; }
.mentor-fork { margin-left: auto; opacity: 0; font-size: 11px; padding: 1px 7px; background: none; border: 1px solid var(--line); border-radius: 6px; }
.mentor-message:hover .mentor-fork, .mentor-fork:focus-visible { opacity: 1; }
.mentor-tool { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--canvas, #f6f7f3); display: grid; gap: 6px; justify-items: start; }
.mentor-tool summary { cursor: pointer; font-size: 13px; }
.mentor-tool-run { display: grid; gap: 2px; width: 100%; }
.mentor-tool-run code { font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.mentor-tool-output { margin: 0; max-height: 200px; overflow: auto; font-size: 11px; background: #1f2420; color: #e7ece4; padding: 6px 8px; border-radius: 6px; white-space: pre-wrap; width: 100%; box-sizing: border-box; }
.mentor-settings-group { display: grid; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; }
.mentor-settings-group textarea { width: 100%; box-sizing: border-box; }
.mentor-radio { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; }
.mentor-thread-top { display: flex; align-items: baseline; gap: 10px; }
.mentor-usage { margin-left: auto; cursor: help; }
.mentor-settings-group { width: 100%; box-sizing: border-box; } .mentor-settings-group > button { justify-self: start; }

/* The single alarm for a refuted hypothesis, just above the input. */
.mentor-stop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #e2b4af; background: #fbeceb; border-radius: 10px; color: #7d2f2a; font-size: 13px; }
.mentor-stop > span { flex: 1 1 220px; }
