/* Desktop MVP additions on top of product-design-demo/styles.css. */

a.icon-button {
  text-decoration: none;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr) 340px;
}

.app-shell.sidebar-collapsed .sidebar {
  align-items: center;
  gap: 18px;
  padding-inline: 12px;
}

.app-shell.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  gap: 8px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand > div,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .sidebar-section,
.app-shell.sidebar-collapsed .account-bar > div {
  display: none;
}

.app-shell.sidebar-collapsed .primary-nav {
  width: 100%;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .account-bar {
  justify-content: center;
}

.thread-item small {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 6px;
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
}

.active-thread-list .thread-item,
.thread-list .thread-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  column-gap: 10px;
}

.thread-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
}

button:disabled:hover,
button[aria-disabled="true"]:hover {
  border-color: var(--line);
  color: var(--muted);
  transform: none;
}

.thread-item small b {
  overflow: hidden;
  max-width: 72px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-item small em {
  color: var(--faint);
  font-style: normal;
  white-space: nowrap;
}

.thread-item.active small b {
  color: var(--text);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar-top,
.brand,
.primary-nav,
.account-bar {
  flex: 0 0 auto;
}

.sidebar-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 26, 23, 0.2) transparent;
}

.app-shell.sidebar-collapsed .sidebar-scroll {
  display: none;
}

.app-shell.dock-collapsed {
  grid-template-columns: 320px minmax(0, 1fr) 0;
}

.app-shell.sidebar-collapsed.dock-collapsed {
  grid-template-columns: 76px minmax(0, 1fr) 0;
}

.app-shell.dock-collapsed .action-dock {
  display: none;
}

.file-input {
  display: none;
}

.attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.attachment-strip[hidden] {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.attachment-chip strong {
  max-width: 220px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.intake-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.intake-policy > span {
  color: var(--faint);
  font-weight: 650;
}

.scope-options {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.scope-choice {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.scope-choice.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(20, 24, 18, 0.08);
}

.intake-policy small {
  min-width: 220px;
  color: var(--faint);
}

.composer.is-dragging {
  border-color: rgba(44, 125, 246, 0.38);
  box-shadow: 0 18px 50px rgba(44, 125, 246, 0.12);
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.rfq-table {
  min-width: 0;
}

.rfq-table th,
.rfq-table td {
  padding-right: 8px;
  padding-left: 8px;
}

.rfq-table th:first-child,
.rfq-table td:first-child {
  min-width: 132px;
}

.task-inspector {
  grid-auto-rows: max-content;
}

.app-shell.is-home .inspector-tabs,
.app-shell.is-home .inspector-panel {
  display: none;
}

.console-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.task-environment {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.task-environment dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.task-environment dl div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 24px;
}

.task-environment dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 750;
}

.task-environment dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.inspector-tabs button {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.inspector-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(20, 24, 18, 0.08);
}

.inspector-panel {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.inspector-panel[hidden] {
  display: none;
}

.compact-note {
  margin-top: 2px;
}

.compact-steps {
  gap: 6px;
}

.compact-steps li {
  min-height: 28px;
  font-size: 13px;
}

.compact-result-list,
.evidence-list {
  display: grid;
  gap: 10px;
}

.compact-result-row,
.evidence-list article {
  display: flex;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.compact-result-row {
  align-items: center;
  justify-content: space-between;
}

.compact-result-row > div:first-child,
.evidence-list article > div {
  min-width: 0;
}

.compact-result-row strong,
.evidence-list strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-result-row span,
.evidence-list span,
.evidence-list p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.compact-result-row > div:last-child {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 6px;
}

.compact-result-row b {
  color: var(--text);
  font-size: 12px;
}

.compact-supplier {
  padding-top: 2px;
}

.evidence-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--blue);
}

.evidence-list .preview-card {
  display: block;
}

.source-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.intelligence-card,
.skill-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.inline-title {
  justify-content: space-between;
}

.inline-title mark {
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d5fc7;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.intelligence-card > p,
.skill-card > p,
.intel-summary span,
.source-row span,
.mini-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.intel-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.intel-summary b {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list {
  display: grid;
  gap: 7px;
}

.mini-list p {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
}

.mini-list strong {
  color: var(--text);
  font-size: 12px;
}

.source-row,
.candidate-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.source-row span {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.market-action-panel {
  display: grid;
  gap: 12px;
}

.market-action-panel.is-waiting {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.market-action-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-panel {
  display: grid;
  gap: 10px;
}

.status-panel article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.status-panel strong {
  color: var(--text);
  font-size: 13px;
}

.status-panel span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.market-action-buttons {
  display: grid;
  gap: 8px;
}

.home-canvas[hidden],
.run-workspace[hidden] {
  display: none;
}

.home-canvas .connectors,
.home-canvas .practice {
  width: min(100%, 1180px);
  margin-inline: auto;
}

.home-canvas .connectors .block-head,
.home-canvas .practice .block-head {
  width: 100%;
}

.home-canvas .connector-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  width: 100%;
  max-width: none;
  margin: 0;
}

.home-canvas .connector-card {
  min-width: 0;
  min-height: 108px;
  padding: 16px;
}

.home-canvas .connector-card strong,
.home-canvas .connector-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-canvas .connector-card span {
  max-width: 100%;
}

.run-workspace {
  display: grid;
  width: min(100%, 920px);
  margin: 72px auto 0;
  gap: 18px;
}

.run-scroll {
  display: grid;
  min-height: 0;
  gap: 18px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.run-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.thread-head,
.answer-header,
.compact-head,
.run-timeline div,
.next-action-row,
.thread-composer .composer-actions {
  display: flex;
  align-items: center;
}

.thread-head {
  justify-content: space-between;
  gap: 12px;
}

.thread-head > span,
.answer-header span,
.compact-head span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.answer-card,
.run-progress,
.run-next,
.thread-composer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.answer-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.thread-context-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.thread-context-label svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.answer-card.has-messages {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.answer-card.has-messages .answer-header,
.answer-card.has-messages .question-bubble {
  display: none;
}

.answer-card.has-messages .answer-body {
  gap: 0;
}

.question-bubble {
  justify-self: end;
  max-width: min(680px, 100%);
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 650;
}

.answer-header {
  justify-content: space-between;
  gap: 16px;
}

.answer-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.22;
}

.answer-header mark {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d5fc7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.answer-body {
  display: grid;
  gap: 12px;
}

.conversation-flow {
  display: grid;
  gap: 22px;
  padding: 4px 0;
}

.message-row {
  display: grid;
  gap: 7px;
  animation: nexusFadeIn 180ms ease-out both;
}

.message-row.user-message {
  justify-items: end;
}

.message-row.assistant-message {
  justify-items: start;
}

.message-meta {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.message-bubble {
  max-width: min(100%, 760px);
  border-radius: 18px;
}

.message-bubble.user {
  padding: 10px 14px;
  background: #f1f2ed;
  color: var(--text);
  font-weight: 650;
}

.message-bubble.assistant {
  display: grid;
  width: min(100%, 760px);
  gap: 16px;
  border-radius: 0;
}

.assistant-progress {
  display: grid;
  gap: 8px;
  width: min(100%, 620px);
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.process-step {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 13px;
}

.process-step p {
  margin: 0;
  line-height: 1.5;
}

.process-step.done .progress-dot {
  background: var(--green);
  animation: none;
  box-shadow: none;
}

.process-step.pending .progress-dot {
  background: var(--line-strong);
  animation: none;
  box-shadow: none;
}

.process-step.active p {
  color: var(--text);
  font-weight: 650;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(44, 125, 246, 0.28);
  animation: nexusPulse 1.4s ease-out infinite;
}

.answer-section {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.answer-section h3 {
  margin: 0;
  font-size: 15px;
}

.answer-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.market-decision-card {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.market-decision-card > span,
.model-notes span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.market-decision-card > p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.market-decision-card ul,
.market-action-panel ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.market-decision-card li,
.market-action-panel li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.model-notes {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.model-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.market-brief-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.market-brief-grid article {
  display: grid;
  grid-template-columns: 18px 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.market-brief-grid svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.market-brief-grid strong {
  color: var(--text);
  font-size: 14px;
}

.market-brief-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.market-compare {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.artifact-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(100%, 620px);
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.artifact-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.artifact-card svg {
  width: 19px;
  height: 19px;
  color: var(--blue);
}

.artifact-card span,
.artifact-card em {
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.artifact-card strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

.artifact-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.artifact-preview {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.artifact-preview svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.artifact-preview p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.artifact-preview span {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

.observability-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.observability-head,
.observability-metrics {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.observability-head strong {
  color: var(--text);
  font-size: 13px;
}

.observability-head span,
.observability-card p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.observability-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.observability-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.observability-metrics span {
  display: grid;
  gap: 2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 750;
}

.observability-metrics b {
  color: var(--text);
  font-size: 14px;
}

.market-compare-head,
.market-compare article {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(88px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.market-compare-head {
  background: var(--surface-soft);
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.market-compare article + article {
  border-top: 1px solid var(--line);
}

.market-compare strong,
.market-compare b {
  color: var(--text);
  font-size: 13px;
}

.market-compare p,
.market-compare span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.run-detail {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.run-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.run-detail summary em {
  color: var(--faint);
  font-style: normal;
  font-weight: 650;
}

.run-detail p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.run-process {
  display: grid;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.run-process summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.run-process summary em {
  color: var(--blue);
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.run-process-steps {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--line);
}

.run-timeline .run-process-steps {
  display: grid;
  align-items: stretch;
  gap: 6px;
  min-height: 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.run-process-steps > div {
  position: relative;
  min-height: 26px;
  padding: 0 0 0 6px;
  background: transparent;
}

.run-process-steps > div::before {
  position: absolute;
  top: 10px;
  left: -18px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
}

.run-process-steps > div.done::before {
  background: var(--green);
}

.run-process-steps > div.active::before {
  background: var(--blue);
}

.run-progress,
.run-next {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.run-progress {
  order: 3;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.run-progress .compact-head {
  display: none;
}

.run-next {
  order: 2;
}

.run-next[hidden] {
  display: none;
}

.compact-head {
  justify-content: space-between;
  gap: 14px;
  margin: 0;
}

.compact-head h2 {
  margin: 0;
  font-size: 17px;
}

.run-timeline {
  display: grid;
  gap: 8px;
}

.run-timeline div {
  gap: 9px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.run-process .run-process-steps > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  min-height: 26px;
  padding: 0 0 8px 6px;
  border-radius: 0;
  background: transparent;
  line-height: 1.45;
}

.run-process .run-process-steps svg {
  display: none;
}

.run-process .run-process-steps span {
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.run-timeline svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.run-timeline .done svg {
  color: var(--green);
}

.run-timeline .active {
  color: var(--text);
  font-weight: 650;
}

.run-timeline .active svg {
  color: var(--blue);
}

.next-action-row {
  flex-wrap: wrap;
  gap: 8px;
}

.next-action-row button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.next-action-row button.primary {
  border-color: rgba(44, 125, 246, 0.22);
  background: var(--blue-soft);
  color: #1d5fc7;
}

.next-action-row button.secondary {
  color: var(--muted);
}

.next-action-row button:hover {
  border-color: var(--line-strong);
}

.next-action-row svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.thread-composer {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(20, 24, 18, 0.08);
}

.thread-composer textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.thread-composer .composer-actions {
  justify-content: space-between;
  gap: 12px;
}

@keyframes nexusFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nexusPulse {
  70% {
    box-shadow: 0 0 0 7px rgba(44, 125, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(44, 125, 246, 0);
  }
}

@media (min-width: 861px) {
  .app-shell:not(.is-home) {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell:not(.is-home) .canvas {
    display: grid;
    height: 100vh;
    min-height: 0;
    grid-template-rows: 40px minmax(0, 1fr);
    overflow-x: hidden;
    overflow-y: hidden;
    padding-bottom: 10px;
    background: var(--surface);
  }

  .app-shell:not(.is-home) .topbar {
    position: relative;
    z-index: 5;
  }

  .app-shell:not(.is-home) .run-workspace {
    width: min(100%, 920px);
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 auto;
  }

  .app-shell:not(.is-home) .run-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 48px 2px 104px;
    scroll-padding-bottom: 104px;
  }

  .app-shell:not(.is-home) .thread-composer {
    position: relative;
    z-index: 6;
    margin-bottom: 6px;
    background: var(--surface);
    box-shadow: 0 -10px 28px rgba(20, 24, 18, 0.08);
  }
}

.evidence-grid > div {
  min-width: 0;
}

.evidence-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  top: 72px;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 9999;
  width: max-content;
  max-width: min(420px, calc(100vw - 48px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #191a17;
  box-shadow: 0 18px 42px rgba(20, 24, 18, 0.18);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast[hidden] {
  display: block;
}

.toast.show,
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 540px) {
  .toast {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    text-align: left;
    transform: translateY(-8px);
  }

  .toast.show,
  .toast.is-visible {
    transform: translateY(0);
  }

  .app-shell.sidebar-collapsed,
  .app-shell.dock-collapsed,
  .app-shell.sidebar-collapsed.dock-collapsed {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .sidebar-scroll {
    display: grid;
    flex: 0 0 auto;
    gap: 18px;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .sidebar-section {
    display: grid;
  }

  .compact-result-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-result-row > div:last-child {
    width: 100%;
    justify-items: start;
  }

  .attachment-chip {
    width: 100%;
  }

  .attachment-chip strong {
    max-width: none;
  }

  .intake-policy small {
    width: 100%;
    min-width: 0;
  }

  .run-workspace {
    width: 100%;
    margin-top: 44px;
    gap: 14px;
  }

  .run-scroll {
    gap: 14px;
  }

  .thread-head,
  .answer-header,
  .thread-composer .composer-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .question-bubble {
    justify-self: stretch;
  }

  .answer-header h2 {
    font-size: 21px;
  }

  .market-brief-grid {
    grid-template-columns: 1fr;
  }

  .market-brief-grid article {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .market-brief-grid article p {
    grid-column: 2;
  }

  .market-compare-head {
    display: none;
  }

  .market-compare article {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .market-decision-card > p {
    font-size: 15px;
  }

  .thread-composer .left-controls,
  .thread-composer .right-controls {
    width: 100%;
    justify-content: space-between;
  }

  .artifact-card {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .artifact-card em {
    grid-column: 2;
  }
}
