/* Workspace refresh: professional tool conventions (Microsoft 365 / regulatory
   intelligence suites): quiet surfaces, dense tables, status pills, tabs, copilot pane. */
.prospect {
  --surface: #fff;
  --canvas: #f5f6fb;
  --soft: #f3f4fb;
  --ok: #18794e; --ok-bg: #e9f6ef;
  --warn: #9a5b00; --warn-bg: #fff4e0;
  --danger: #b42318; --danger-bg: #fdecec;
  --info: #2a35c9; --info-bg: #eef0ff;
  --radius: 12px;
  --shadow: 0 1px 2px #0e13300d, 0 6px 20px #222e7b0d;
  background: var(--canvas);
}
.prospect .layout { background: var(--canvas); grid-template-columns: 216px minmax(0, 1fr); }
.prospect .top { height: 56px; }
.prospect .brand img { width: 34px; }

/* Navigation */
.prospect .workspace-nav { display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; position: sticky; top: 0; align-self: start; min-height: calc(100dvh - 56px); }
.prospect .nav { width: 100%; border-radius: 8px; font-size: 14px; }
.prospect .nav.selected { box-shadow: inset 3px 0 0 var(--blue); }

/* Page heading */
.prospect .content { width: min(1440px, 100%); padding: 20px clamp(16px, 2.6vw, 36px) 64px; }
.prospect .page-heading { border: 0; padding: 0 0 14px; margin-bottom: 4px; gap: 16px; align-items: center; }
.prospect .page-heading h1 { font-size: 24px; color: var(--ink); }
.heading-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.heading-actions .project-select { width: 260px; }
.heading-actions .primary { white-space: nowrap; padding: 9px 14px; }
.section-title { font: 500 18px var(--title); margin: 24px 0 10px; }
.empty { color: var(--muted); padding: 8px 0; }
.muted { color: var(--muted); }
.meta-line { color: var(--muted); font-size: 13px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill-direct, .pill-requirement, .pill-present { background: var(--ok-bg); color: var(--ok); }
.pill-monitor, .pill-recommendation, .pill-incomplete, .pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-not_found { background: var(--danger-bg); color: var(--danger); }
.pill-work_suggestion, .pill-not_evaluable { background: var(--info-bg); color: var(--info); }

/* Project tabs */
.project-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.prospect .project-tabs [role=tab] { border: 0; border-radius: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.prospect .project-tabs [role=tab][aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; line-height: 20px; text-align: center; }
.tab-panel { animation: fade-in .18s ease; }

/* Briefing: key points + assistant side by side */
.briefing { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.brief-panel, .assistant-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.brief-panel { padding: 16px 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.panel-meta { color: var(--muted); font-size: 12.5px; }
.prospect .decision-items { grid-template-columns: 1fr; gap: 10px; }
.prospect .decision-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 10px; padding: 12px 14px; gap: 6px; animation: rise .35s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
.prospect .decision-item:has(.pill-monitor) { border-left-color: #e0a238; }
.decision-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prospect .decision-item h3 { margin: 0; font: 500 17px/1.25 var(--title); }
.decision-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.prospect .ask-button { border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--blue); background: var(--info-bg); border-color: transparent; display: inline-flex; gap: 6px; align-items: center; }
.prospect .ask-button::before { content: ""; width: 12px; height: 12px; background: conic-gradient(from 0deg, var(--blue), var(--pink), var(--blue)); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l3 9 9 3-9 3-3 9-3-9-9-3 9-3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.prospect .link-button { border: 0; background: none; padding: 5px 4px; color: var(--blue); font-weight: 600; font-size: 13px; }
.prospect .link-button:hover { text-decoration: underline; }
.brief-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; border-top: 1px solid #eef0f7; padding-top: 10px; }
.brief-foot .collection-details { margin: 0; font-size: 13px; }
.brief-foot summary { cursor: pointer; color: var(--muted); }
.brief-foot button { font-size: 13px; padding: 6px 10px; }

/* Assistant pane (copilot style) */
.assistant-panel { position: sticky; top: 16px; display: flex; flex-direction: column; height: min(680px, calc(100dvh - 120px)); padding: 14px 14px 10px; background: linear-gradient(180deg, #fbfbff, #fff 120px); }
.spark { width: 18px; height: 18px; flex: none; background: conic-gradient(from 0deg, var(--blue), var(--pink), #7b61ff, var(--blue)); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l3 9 9 3-9 3-3 9-3-9-9-3 9-3z'/%3E%3C/svg%3E") center / contain no-repeat; animation: spin 8s linear infinite; }
.thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 2px 2px 8px; scroll-behavior: smooth; }
.chat-turn { display: flex; flex-direction: column; gap: 8px; animation: rise .25s ease both; }
.bubble { max-width: 92%; border-radius: 14px; padding: 9px 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 6px; color: var(--ink); }
.bubble p:last-child { margin-bottom: 0; }
.bubble small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.bubble.user { align-self: flex-end; background: var(--info-bg); border-bottom-right-radius: 4px; }
.bubble.mira { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; position: relative; margin-left: 26px; }
.bubble.mira::before { content: ""; position: absolute; left: -26px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #9aa3ff 45%, var(--blue)); box-shadow: 0 0 0 2px #fff; }
.bubble .note-title { font-weight: 700; }
.bubble .note-summary { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bubble .resolution { color: var(--ink-2); font-size: 13px; }
.bubble .strong { font-weight: 700; }
.bubble button { margin-top: 6px; font-size: 13px; padding: 6px 11px; }
.bubble-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.clarify { margin: 8px 0; }
.clarify-q { font-weight: 600; }
.clarify-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.clarify input { width: 100%; font-size: 13px; padding: 7px 9px; }
.typing::after { content: ""; display: inline-block; width: 18px; text-align: left; animation: dots 1.2s steps(4) infinite; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.prospect .suggestion { border-radius: 999px; padding: 5px 11px; font-size: 12.5px; background: #fff; color: var(--ink-2); border-color: var(--line); text-align: left; animation: rise .3s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.prospect .suggestion:hover { border-color: #b9c0f4; color: var(--blue); }
.composer { border: 1px solid #cfd4f0; border-radius: 12px; background: #fff; padding: 8px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #2a35c91f; }
.prospect .composer textarea { border: 0; padding: 4px 6px; resize: none; min-height: 44px; max-height: 160px; font-size: 14px; outline: none; }
.prospect .composer textarea:focus-visible { outline: none; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.toggle input { width: auto; accent-color: var(--blue); }
.prospect .send { padding: 7px 14px; border-radius: 9px; }
.assistant-status { min-height: 18px; margin: 6px 2px 0; font-size: 12.5px; color: var(--muted); }
.assistant-status.is-busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--blue); animation: pulse 1s ease-in-out infinite; vertical-align: -1px; }

/* Documents board */
.prospect .monitor-board { border-radius: 16px; margin-top: 0; box-shadow: var(--shadow); }
.prospect .board-head { gap: 12px; flex-wrap: wrap; padding-block: 12px; min-height: 0; }
.prospect .board-head h2 { margin: 0; font-size: 19px; }
.prospect .board-head h2 b { color: var(--blue); font-weight: 500; }
.board-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.prospect .chip { border-radius: 999px; padding: 4px 11px; font-size: 13px; background: #fff; border-color: var(--line); color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.prospect .chip strong { color: var(--blue); font-weight: 700; }
.prospect .chip:disabled { opacity: .5; cursor: default; }
.prospect .chip.is-picked { background: var(--info-bg); border-color: #b9c0f4; color: var(--blue); }
.prospect .board-filters { margin-top: 0; }

/* Notes */
.prospect .decision-note { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.prospect .decision-note > summary { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; list-style: none; }
.prospect .decision-note > summary::-webkit-details-marker { display: none; }
.note-heading { font: 500 18px/1.3 var(--title); }
.decision-note > summary small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.note-lead { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.note-issue { border-top: 1px solid #eef0f7; padding: 12px 0; }
.note-issue h3, .note-subtitle { font-size: 16px; margin: 4px 0 6px; }
.issue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px 16px; margin: 10px 0; }
.issue-grid dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.issue-grid dd { margin: 2px 0 0; font-size: 14px; }
.checklist { display: grid; gap: 8px; }
.checklist-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfcff; }
.checklist-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.checklist-item p { margin: 4px 0; }
.citation { margin: 6px 0; font-size: 13.5px; }
.citation > summary { cursor: pointer; color: var(--blue); }
.citation blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #bcc3ef; background: var(--soft); color: var(--ink-2); }
.citation small { display: block; color: var(--muted); }
.note-limits, .note-draft, .note-edit, .note-dossier { border-top: 1px solid #eef0f7; padding: 8px 0; }
.note-limits > summary, .note-draft > summary, .note-edit > summary, .note-dossier > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.note-limits p { color: var(--muted); font-size: 13.5px; }
.note-exports { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0 14px; border-top: 1px solid #eef0f7; }
.button-link { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; color: var(--ink); text-decoration: none; font-size: 14px; }
.button-link:hover { border-color: #b9c0f4; color: var(--blue); }

/* Action plan */
.prospect .r3-plan { border: 0; margin: 0; padding: 0; }
.prospect .r3-action { background: #fff; box-shadow: var(--shadow); }
.action-head h4 { margin: 0 0 4px; }

/* Portfolio */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); animation: rise .3s ease both; }
.kpi strong { display: block; font: 500 30px/1.1 var(--title); color: var(--ink); }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi.danger strong { color: var(--danger); }
.kpi.warn strong { color: var(--warn); }
.kpi.ok strong { color: var(--ok); }
.pf-table { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.pf-row { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(70px, .7fr)) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid #eef0f7; }
.pf-header { border-top: 0; background: #fafbff; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pf-row:not(.pf-header):hover { background: #fafbff; }
.prospect .pf-name { border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-name strong { font: 500 16px/1.25 var(--title); color: var(--ink); overflow-wrap: anywhere; }
.pf-name small { color: var(--muted); font-size: 12.5px; }
.prospect .pf-name:hover strong { color: var(--blue); }
.pf-cell { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.prospect .pf-count { min-width: 38px; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 14px; border: 1px solid transparent; }
.prospect .pf-count.info { background: var(--info-bg); color: var(--info); }
.prospect .pf-count.warn { background: var(--warn-bg); color: var(--warn); }
.prospect .pf-count.danger { background: var(--danger-bg); color: var(--danger); }
.prospect .pf-count.zero { background: #fff; color: var(--muted); border-color: var(--line); }
.prospect .pf-count[aria-expanded="true"] { box-shadow: 0 0 0 2px currentColor inset; }
.prospect .pf-open { border: 0; background: var(--soft); border-radius: 8px; padding: 4px 0; font-size: 20px; line-height: 1; color: var(--blue); }
.pf-detail { padding: 10px 16px 14px 32px; background: var(--soft); border-top: 1px solid #eef0f7; animation: fade-in .2s ease; }
.pf-detail h4 { margin: 0 0 6px; font-size: 14px; }
.pf-detail ul { margin: 0; padding-left: 18px; font-size: 14px; }
.coverage-bar { display: flex; width: 64px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.coverage-bar .ok { background: #3aa76d; } .coverage-bar .warn { background: #e0a238; } .coverage-bar .bad { background: #d9534f; }
.skeleton { height: 160px; border-radius: 14px; background: linear-gradient(90deg, #eef0f7 25%, #f7f8fc 50%, #eef0f7 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.empty-state { text-align: center; padding: 56px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.empty-state h2 { margin: 14px 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 16px; }

/* Project form + set-up agent */
.prospect #project-form { border-radius: 16px; padding: clamp(18px, 3vw, 28px); }
.prospect .project-form textarea[name=description] { font: 400 15px/1.5 inherit; }
.advanced > summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.facts-label { font-size: 13px; font-weight: 600; width: 100%; }
.fact-chip { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--soft); max-width: 100%; }
.fact-chip small { color: var(--muted); font-size: 11.5px; }
.fact-chip strong { font-size: 13.5px; font-weight: 600; }
.fact-chip.is-pending { border-style: dashed; border-color: #b9c0f4; background: var(--info-bg); animation: pop .35s ease both; }
.prospect .is-filled { animation: filled 1.6s ease both; }
.prefill { margin-bottom: 16px; }
.agent-card { position: relative; background: #fff; border-radius: 20px; padding: clamp(20px, 3.4vw, 34px); box-shadow: 0 20px 50px #222e7b1c; isolation: isolate; animation: rise .35s ease both; }
.agent-card::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 21.5px; background: conic-gradient(from var(--angle, 0deg), #2a35c9, #c2185b, #7b61ff, #2a35c9); animation: rotate 6s linear infinite; }
.agent-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: #fff; }
.agent-card.is-done { padding: 12px 16px; box-shadow: var(--shadow); }
.agent-card.is-done::before { animation: none; opacity: .5; }
.agent-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.agent-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
.agent-head p { margin: 4px 0 0; color: var(--muted); }
.orb { width: 44px; height: 44px; flex: none; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 0 8%, #b8bdff 30%, #2a35c9 62%, #c2185b 100%); box-shadow: 0 6px 20px #2a35c955; animation: breathe 3.2s ease-in-out infinite; display: inline-block; }
.orb.small { width: 22px; height: 22px; }
.is-thinking .orb { animation: breathe 1s ease-in-out infinite, spin 2.4s linear infinite; }
.agent-card textarea { width: 100%; min-height: 140px; border-radius: 14px; padding: 16px 18px; font: 500 clamp(17px, 1.8vw, 21px)/1.45 var(--title); letter-spacing: -.01em; background: #fafaff; border: 1px solid #dfe2f6; }
.agent-card textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #2a35c91c; outline: none; }
.example-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.agent-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.prospect .agent-go { padding: 12px 20px; border-radius: 11px; font-size: 15px; background: linear-gradient(135deg, #2a35c9, #5b3fd8 60%, #c2185b); border: 0; box-shadow: 0 8px 20px #2a35c944; transition: transform .15s, box-shadow .15s; }
.prospect .agent-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px #2a35c955; }
.prospect .agent-go:disabled { opacity: .45; box-shadow: none; }
.thinking-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.thinking-steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); opacity: 0; animation: step-in .4s ease forwards; }
.thinking-steps li:nth-child(2) { animation-delay: 1.1s; } .thinking-steps li:nth-child(3) { animation-delay: 2.4s; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); animation: pulse 1s ease-in-out infinite; }
.shimmer { height: 8px; border-radius: 4px; margin: 6px 0 14px; background: linear-gradient(90deg, #e8eaff 25%, #c9ceff 50%, #e8eaff 75%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.understanding { font: 500 clamp(18px, 2vw, 22px)/1.4 var(--title); margin: 0 0 14px; min-height: 1.4em; color: var(--ink); }
.hypotheses { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hypothesis { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; background: var(--ok-bg); color: #145c3c; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(400ms + var(--i, 0) * 90ms); }
.hypothesis.inferred { background: var(--info-bg); color: var(--blue); border: 1px dashed #aab2f2; }
.hypothesis small { font-size: 11px; opacity: .8; }
.proposal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; margin: 0; }
.proposal-row { background: var(--soft); border-radius: 10px; padding: 10px 12px; animation: rise .35s ease both; animation-delay: calc(700ms + var(--i, 0) * 80ms); }
.proposal dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.proposal dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.is-question { animation: slide-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.q-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.q-bar { flex: 1; height: 4px; border-radius: 2px; background: #eceefa; overflow: hidden; }
.q-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2a35c9, #c2185b); transition: width .5s ease; }
.q-body h3 { font: 500 clamp(20px, 2.2vw, 26px)/1.25 var(--title); margin: 0 0 4px; }
.q-why { color: var(--muted); margin: 0 0 16px; }
.q-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.prospect .q-option { display: flex; align-items: center; gap: 10px; text-align: left; padding: 13px 14px; border-radius: 12px; border: 1.5px solid #e1e4f5; background: #fff; font-size: 15px; transition: border-color .15s, transform .15s, background .15s; animation: rise .3s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.prospect .q-option:hover { border-color: #9aa3f0; transform: translateY(-1px); }
.prospect .q-option kbd { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 600 12px var(--title); background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.prospect .q-option.is-likely { border-color: #b9c0f4; background: #fafaff; }
.likely-tag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--blue); background: var(--info-bg); border-radius: 999px; padding: 2px 8px; }
.prospect .q-option.is-picked, .prospect .q-option[aria-pressed="true"] { border-color: var(--blue); background: var(--info-bg); }
.prospect .q-option-other { border-style: dashed; color: var(--ink-2); }
.q-other { display: flex; gap: 8px; margin-top: 10px; }
.q-other input { flex: 1; }
.agent-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; color: var(--ink-2); }
.agent-done .link-button { margin-left: auto; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); background: #0e1330; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 12px 30px #0e133040; font-size: 14px; animation: toast-in .25s ease both; }
.toast.is-error { background: #7a1b14; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes step-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes filled { 0% { box-shadow: 0 0 0 0 #2a35c955; background-color: #eef0ff; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes rotate { to { --angle: 360deg; } }

@media (max-width: 1100px) {
  .briefing { grid-template-columns: minmax(0, 1fr); }
  .assistant-panel { position: static; height: auto; max-height: none; }
  .thread { max-height: 420px; }
}
@media (max-width: 1000px) {
  .prospect .workspace-nav { position: static; min-height: 0; flex-direction: row; }
  .prospect .nav { width: auto; }
  .prospect .nav.selected { box-shadow: inset 0 -2px 0 var(--blue); }
  .pf-row { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(60px, .7fr)) 44px; }
  .pf-row > :nth-child(5), .pf-row > :nth-child(6) { display: none; }
}
@media (max-width: 700px) {
  .prospect .workspace-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prospect .nav.selected { box-shadow: none; }
  .prospect .page-heading { display: flex; flex-wrap: wrap; }
  .heading-actions { width: 100%; }
  .heading-actions .project-select { flex: 1; width: auto; margin: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-header { display: none; }
  .pf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; }
  .pf-row > .pf-name { grid-column: 1 / -1; }
  .pf-row > :nth-child(5), .pf-row > :nth-child(6) { display: none; }
  .pf-row > .pf-open { display: none; }
  .pf-cell { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pf-cell::before { content: attr(data-label); font-size: 11px; color: var(--muted); }
  .bubble { max-width: 100%; }
  .agent-card textarea { min-height: 120px; }
  .q-options { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .prospect *, .prospect *::before, .prospect *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .thinking-steps li { opacity: 1; }
}
.prospect #decision-workspace { margin: 0; }
.prospect input[type=checkbox] { accent-color: var(--blue); }
@media (min-width: 1001px) {
  .prospect .layout { background: linear-gradient(90deg, #fff 215px, var(--line) 215px 216px, var(--canvas) 216px); }
  .prospect .workspace-nav { border-right: 0; background: transparent; }
}
.prospect .suggestion { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { mask-image: linear-gradient(transparent, #000 28px); padding-top: 18px; }
@media (max-width: 700px) {
  .board-chips { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .prospect .chip { white-space: nowrap; }
  .prospect .board-head h2 { flex: 1; }
}
.prospect .q-option { position: relative; padding-right: 14px; }
.prospect .q-option.is-likely { padding-top: 24px; }
.likely-tag { position: absolute; top: 7px; right: 8px; margin: 0; }
.citation > summary, .r3-evidence > summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.prospect .alert-settings { align-self: start; align-content: start; }
.prospect .alert-layout { align-items: start; }
.prospect #review-list { background: transparent; border: 0; padding: 0; }
.sources-line { margin: 0 0 10px; }
.checklist { grid-template-columns: minmax(0, 1fr); }
.checklist-item, .citation, .r3-evidence, .note-issue, .decision-note, .r3-action { min-width: 0; }
.citation, .r3-evidence { overflow: hidden; }
.thread > :first-child { margin-top: auto; }

/* Collection entry point */
.project-tabs { align-items: center; overflow: visible; }
.tab-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; position: relative; padding-bottom: 6px; }
.tab-tools .panel-meta.is-running { color: var(--blue); font-weight: 600; }
.prospect .collect-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 0; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, #2a35c9, #5b3fd8 65%, #c2185b); box-shadow: 0 6px 16px #2a35c933; transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.prospect .collect-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px #2a35c944; }
.prospect .collect-button:disabled { opacity: .55; transform: none; box-shadow: none; }
.collect-icon { width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36M21 4v5h-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.collect-button:disabled .collect-icon { animation: spin 1s linear infinite; }
.popover { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; width: min(420px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px #0e133026; padding: 16px; animation: rise .18s ease both; }
.popover h2 { margin: 0 0 6px; font-size: 18px; }
.popover label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 6px; }
.popover textarea { width: 100%; font-size: 14px; }
.popover-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.brief-hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 10px; }
.brief-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; border: 1px dashed #c9cff3; border-radius: 12px; background: #fafaff; }
.brief-empty p { margin: 0; color: var(--ink-2); }
.composer-hint { font-size: 12px; color: var(--muted); }

/* Document brief (drawer) */
.prospect .document-drawer { width: min(620px, 100%); padding: 0; background: #fff; }
.prospect .document-drawer[open] { animation: drawer-in .22s cubic-bezier(.2, .8, .2, 1) both; }
.prospect .document-drawer::backdrop { background: #0e133040; backdrop-filter: blur(2px); }
.prospect .drawer-top { padding: 12px 20px; border-bottom: 1px solid #eef0f7; background: #ffffffe8; backdrop-filter: blur(8px); letter-spacing: .06em; font-size: 12px; text-transform: uppercase; color: var(--muted); z-index: 3; }
.prospect .drawer-top button { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1; border-color: var(--line); color: var(--ink-2); }
.brief-doc { padding: 0 0 8px; }
.brief-hero { padding: 20px 24px 6px; }
.brief-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill-impact-high { background: var(--danger-bg); color: var(--danger); }
.pill-impact-medium { background: var(--warn-bg); color: var(--warn); }
.pill-impact-low { background: var(--ok-bg); color: var(--ok); }
.pill-unrelated { background: #f1f1f4; color: #6b6f80; }
.brief-hero h2 { margin: 0; font: 500 clamp(22px, 2.4vw, 27px)/1.2 var(--title); letter-spacing: -.02em; color: var(--ink); }
.brief-official { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: help; }
.brief-notice { margin: 8px 24px 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.brief-callout { margin: 14px 24px 4px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #f1f2ff, #fbf4fa); border: 1px solid #e1e4fb; display: grid; gap: 12px; }
.brief-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.brief-consequence { margin: 0; font: 500 17px/1.4 var(--title); color: var(--ink); }
.brief-next { border-top: 1px solid #dfe2f8; padding-top: 10px; }
.brief-next p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.brief-section { padding: 16px 24px 4px; }
.brief-section h3 { margin: 0 0 8px; font: 700 11px/1.2 var(--title); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brief-section > p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.55; }
.brief-quote { position: relative; margin: 0 0 10px; padding: 14px 16px 14px 44px; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 15px; line-height: 1.55; border: 0; }
.brief-quote::before { content: "\201C"; position: absolute; left: 14px; top: 2px; font: 700 40px/1 Georgia, serif; color: #b9c0f4; }
.brief-more { margin: 4px 0 8px; }
.brief-more > summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13px; }
.brief-more blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #d7dbf5; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.brief-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.brief-checklist li { position: relative; padding: 8px 10px 8px 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.brief-checklist li::before { content: ""; position: absolute; left: 11px; top: 11px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #e0a238; }
.brief-analysis .answer { margin-top: 10px; font-size: 14px; }
.brief-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0 0 8px; padding: 12px 14px; border-radius: 12px; background: #fafbff; border: 1px solid #eef0f7; }
.brief-meta dt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.brief-meta dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.brief-actions { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 24px; background: #ffffffee; backdrop-filter: blur(8px); border-top: 1px solid #eef0f7; }
.brief-actions .link-button { margin-left: auto; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) {
  .tab-tools { margin-left: 0; width: 100%; justify-content: space-between; padding: 8px 0; }
  .project-tabs { flex-wrap: wrap; }
  .composer-hint { display: none; }
  .brief-hero, .brief-section { padding-left: 16px; padding-right: 16px; }
  .brief-callout { margin-left: 16px; margin-right: 16px; }
  .brief-meta { grid-template-columns: minmax(0, 1fr); }
  .brief-actions { padding: 10px 16px; }
  .brief-actions .primary, .brief-actions .ask-button { flex: 1; justify-content: center; }
  .popover { position: fixed; top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
}

@media (max-width: 700px) {
  .brief-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .prospect .brief-actions .primary, .prospect .brief-actions .ask-button { white-space: nowrap; padding: 10px 8px; font-size: 14px; justify-content: center; }
  .prospect .brief-actions .button-link, .prospect .brief-actions .link-button { grid-row: 2; border: 0; padding: 2px 4px; font-size: 13px; text-align: center; color: var(--blue); margin: 0; }
  .brief-consequence { font-size: 16px; }
}.brief-empty.is-running { border-style: solid; border-color: #dfe2f8; background: linear-gradient(90deg, #f6f7ff 25%, #eef0ff 50%, #f6f7ff 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
