:root {
  --navy: #111111;
  --navy-2: #2c2c2c;
  --blue: #525252;
  --orange: #f2a51f;
  --bg: #f7f7f5;
  --panel: #ffffff;
  --line: #dededb;
  --text: #111111;
  --muted: #525252;
  --surface-2: #f1f1ef;
  --surface-3: #e8e8e5;
  --text-3: #8a8a8a;
  --good: #067647;
  --good-bg: #d1fadf;
  --bad: #912018;
  --bad-bg: #fee4e2;
  --mixed: #b54708;
  --mixed-bg: #fef0c7;
}

* { box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef5fb 0%, #ffffff 52%, #f7edda 100%);
}
.login-panel {
  width: min(440px, calc(100vw - 32px));
  background: var(--panel);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(8, 36, 59, .15);
}
.brand-mark {
  width: fit-content;
  padding: 6px 10px;
  color: #fff;
  background: var(--navy);
  border-left: 4px solid var(--orange);
  font-weight: 900;
}
.login-panel h1 { margin: 18px 0 8px; font-size: 28px; }
.login-panel p { color: var(--muted); line-height: 1.5; }
.login-panel form { display: flex; gap: 10px; margin-top: 22px; align-items: end; }
.login-panel label {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.login-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 15px;
}
.login-panel button,
.composer button,
.new-chat-btn {
  border: 0;
  border-radius: 6px;
  background: var(--orange);
  color: #1a1a1a;
  font-weight: 900;
  padding: 0 18px;
  cursor: pointer;
}
.composer button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.login-error { color: var(--bad); font-weight: 800; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 308px 1fr;
  max-width: 100%;
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}
.sidebar > .brand-row,
.sidebar > .new-chat-btn,
.sidebar > .side-tabs,
.sidebar > .side-heading {
  flex: 0 0 auto;
}
.brand-row { display: flex; gap: 10px; align-items: center; }
.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--orange);
  color: #111;
  font-weight: 900;
}
.brand-title { font-weight: 900; font-size: 18px; }
.brand-subtitle { color: #c5d7e7; font-size: 12px; }
.new-chat-btn {
  width: 100%;
  min-height: 40px;
  text-align: left;
}
.side-tabs { display: grid; gap: 8px; }
.side-tab {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.side-tab.active {
  background: #fff;
  color: var(--navy);
  border-left: 4px solid var(--orange);
  font-weight: 900;
}
.side-heading {
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  color: #b9d0e3;
  font-weight: 900;
}
.conversation-list,
.case-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  padding-right: 3px;
}
.conversation-list {
  flex: 1 1 0;
  min-height: 154px;
}
.case-list {
  flex: 1 1 0;
  min-height: 154px;
}
.sidebar-loading {
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 10px;
  color: #b9d0e3;
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 800;
}
.conversation-item,
.case-item {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
.conversation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  cursor: pointer;
}
.conversation-select {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.chat-delete {
  min-width: 52px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #d2e4f2;
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
}
.chat-delete:hover,
.chat-delete:focus-visible {
  background: #fff;
  border-color: var(--orange);
  color: var(--bad);
}
.conversation-item.active,
.case-item.active {
  background: #fff;
  border-color: var(--orange);
  color: var(--navy);
  box-shadow: inset 4px 0 0 var(--orange);
}
body[data-active-tab="cases"] .conversation-item.active,
body[data-active-tab="profile"] .conversation-item.active,
body[data-active-tab="docs"] .conversation-item.active,
body[data-active-tab="evaluation"] .conversation-item.active,
body[data-active-tab="chat"] .case-item.active,
body[data-active-tab="profile"] .case-item.active,
body[data-active-tab="docs"] .case-item.active,
body[data-active-tab="evaluation"] .case-item.active {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: none;
}
.conversation-item strong,
.case-item strong {
  display: block;
  font-size: 14px;
  color: #fff;
}
.conversation-item.active strong,
.case-item.active strong {
  color: var(--navy);
}
body[data-active-tab="cases"] .conversation-item.active strong,
body[data-active-tab="profile"] .conversation-item.active strong,
body[data-active-tab="docs"] .conversation-item.active strong,
body[data-active-tab="evaluation"] .conversation-item.active strong,
body[data-active-tab="chat"] .case-item.active strong,
body[data-active-tab="profile"] .case-item.active strong,
body[data-active-tab="docs"] .case-item.active strong,
body[data-active-tab="evaluation"] .case-item.active strong {
  color: #fff;
}
.conversation-item.active .chat-delete {
  border-color: #d6e1ea;
  background: #f8fbfd;
  color: #111111;
}
.conversation-item span,
.case-item span {
  display: block;
  color: #d2e4f2;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.35;
}
.conversation-item.active span:not(.case-status),
.case-item.active span:not(.case-status) {
  color: #39536b;
}
body[data-active-tab="cases"] .conversation-item.active span:not(.case-status),
body[data-active-tab="profile"] .conversation-item.active span:not(.case-status),
body[data-active-tab="docs"] .conversation-item.active span:not(.case-status),
body[data-active-tab="evaluation"] .conversation-item.active span:not(.case-status),
body[data-active-tab="chat"] .case-item.active span:not(.case-status),
body[data-active-tab="profile"] .case-item.active span:not(.case-status),
body[data-active-tab="docs"] .case-item.active span:not(.case-status),
body[data-active-tab="evaluation"] .case-item.active span:not(.case-status) {
  color: #d2e4f2;
}
.case-item .case-status {
  display: inline-flex;
}

.main { min-width: 0; padding: 18px; }
.topbar {
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  padding: 22px;
  border-radius: 8px;
  min-width: 0;
}
.topbar > div:first-child {
  flex: 1 1 330px;
  min-width: min(330px, 100%);
}
.topbar h1 { margin: 0; font-size: 26px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.topbar-status {
  flex: 1 1 360px;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.global-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 620px;
  min-width: min(300px, 100%);
}
.global-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  padding: 0 13px;
  color: var(--text);
  background: #fbfdff;
  font: inherit;
}
.global-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: min(68vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(8, 36, 59, .18);
  padding: 6px;
}
.global-search-results.open {
  display: grid;
  gap: 4px;
}
.global-search-result {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.global-search-result:hover,
.global-search-result:focus-visible {
  outline: 0;
  background: #eef6fc;
}
.global-search-result span {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.global-search-result strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
}
.global-search-result small,
.global-search-empty {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.global-search-empty {
  padding: 12px;
}
.status-pill {
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef6fc;
  color: var(--navy);
  font-weight: 900;
}
.backend-version-pill {
  cursor: default;
  background: #f8fbfd;
}
.app-freshness-pill {
  cursor: default;
  background: #fff8ec;
  border-color: #f5d28f;
  color: #7a4c00;
}
.backend-version-pill.warning {
  background: var(--mixed-bg);
  border-color: #f6c667;
  color: var(--mixed);
}
.app-freshness-pill.warning {
  background: var(--mixed-bg);
  border-color: #f6c667;
  color: var(--mixed);
}
.mode-toggle {
  font: inherit;
  cursor: pointer;
}
.mode-toggle:hover,
.mode-toggle:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(248, 166, 27, .18);
  outline: 0;
}
.mode-toggle:disabled {
  cursor: not-allowed;
  opacity: .65;
  box-shadow: none;
}
.tab-panel { display: none; margin-top: 16px; }
.tab-panel.active { display: block; }

@media (min-width: 1101px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
  .app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
  .sidebar {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
  .main {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
}

.chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.chat-panel,
.inspector,
.case-thread,
.case-rag-panel,
.case-list-panel,
.profile-list-panel,
.profile-fields-panel,
.json-panel,
.docs-list-panel,
.doc-viewer-panel,
.playbook-list-panel,
.playbook-detail-panel,
.background-list-panel,
.background-report-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.chat-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chat-panel.empty-chat {
  background: #fff;
}
.chat-panel.empty-chat .chat-context {
  border-bottom-color: transparent;
}
.chat-panel.empty-chat .messages {
  padding: 0;
  border: 0;
  background: #fff;
  overflow: hidden;
}
.chat-panel.empty-chat .composer {
  border-top-color: transparent;
}
.chat-panel.empty-chat .chat-context + .messages {
  box-shadow: none;
}
.chat-panel.empty-chat .messages::before,
.chat-panel.empty-chat .messages::after {
  display: none;
  content: none;
}
.chat-context {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
#chatTab #caseContextBtn,
#chatTab [data-case-context],
#chatTab .case-context-btn,
#chatTab .legacy-reference-control-hidden,
.chat-context [data-case-context],
.chat-context .case-context-btn,
.chat-context .legacy-reference-control-hidden {
  display: none !important;
}
.mini-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.text-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}
.messages {
  overflow: auto;
  min-height: 0;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.message {
  position: relative;
  max-width: 88%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.5;
  white-space: normal;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.message-text { overflow-wrap: anywhere; }
.message-copy {
  white-space: pre-wrap;
}
.message-version-badge {
  position: absolute;
  top: auto;
  right: 8px;
  bottom: 4px;
  z-index: 1;
  padding: 1px 6px;
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(3, 27, 47, 0.08);
}
.message.user .message-version-badge {
  background: #f6fbff;
}
.message.has-dev-debug,
.message.has-message-translation {
  padding-right: 48px;
}
.message.has-dev-debug.has-message-translation {
  padding-right: 82px;
}
.visual-debug-panel {
  margin-top: 12px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  background: #f8fbff;
  white-space: normal;
}
.dev-debug-panel {
  margin: 0;
  border: 0;
  background: transparent;
  white-space: normal;
  height: 0;
}
.message-translation-panel {
  margin: 0;
  border: 0;
  background: transparent;
  white-space: normal;
  height: 0;
}
.dev-debug-panel[open],
.message-translation-panel[open] {
  width: 100%;
  height: auto;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #d7e4ee;
}
.visual-debug-panel summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.dev-debug-panel > summary {
  position: absolute;
  top: 9px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  flex: 0 0 28px;
  min-height: 28px;
  max-height: 28px;
  cursor: pointer;
  padding: 0;
  border: 1px solid #b9cfe0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  line-height: 1;
  box-shadow: 0 1px 4px rgba(8, 36, 59, .08);
  list-style: none;
}
.message-translation-panel > summary {
  position: absolute;
  top: 9px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  flex: 0 0 28px;
  min-height: 28px;
  max-height: 28px;
  cursor: pointer;
  padding: 0;
  border: 1px solid #b9cfe0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  line-height: 1;
  box-shadow: 0 1px 4px rgba(8, 36, 59, .08);
  list-style: none;
}
.message.has-dev-debug .message-translation-panel > summary {
  top: 9px;
  right: 44px;
}
.dev-debug-panel > summary::-webkit-details-marker,
.message-translation-panel > summary::-webkit-details-marker {
  display: none;
}
.dev-debug-panel > summary::marker,
.message-translation-panel > summary::marker {
  content: "";
}
.dev-debug-panel[open] > summary,
.message-translation-panel[open] > summary {
  background: var(--orange);
  border-color: var(--orange);
  color: #102a43;
  box-shadow: 0 0 0 3px rgba(248, 166, 27, .2);
}
.dev-debug-panel > summary:hover,
.dev-debug-panel > summary:focus-visible,
.message-translation-panel > summary:hover,
.message-translation-panel > summary:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(248, 166, 27, .18);
}
.dev-debug-panel > summary .ui-icon {
  width: 16px;
  height: 16px;
}
.message-translation-panel > summary .ui-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.dev-debug-body {
  display: grid;
  gap: 0;
  margin-right: -34px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  background: #f8fbff;
  overflow: hidden;
}
.message-translation-body {
  margin-right: -34px;
  padding: 10px 12px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  white-space: pre-wrap;
}
.message.user .message-translation-body {
  color: var(--text);
}
.message.has-dev-debug.has-message-translation .dev-debug-body,
.message.has-dev-debug.has-message-translation .message-translation-body {
  margin-right: -68px;
}
.visual-debug-item,
.dev-debug-section {
  border-top: 1px solid #d7e4ee;
  padding: 10px;
}
.dev-debug-body > .dev-debug-section:first-child,
.dev-debug-body > .dev-debug-note:first-child {
  border-top: 0;
}
.dev-debug-note {
  margin: 0;
  padding: 10px;
  color: #5d6b7a;
  font-size: 12px;
}
.dev-debug-note.compact {
  padding: 0;
  margin: 0 0 8px;
}
.dev-pipeline-overview {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #d7e4ee;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fc 100%);
}
.dev-pipeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dev-pipeline-head span {
  display: block;
  color: #5d6b7a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
.dev-pipeline-head strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.25;
}
.dev-pipeline-metrics,
.dev-compact-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dev-pipeline-map {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 7px;
}
.dev-pipeline-map > i {
  align-self: center;
  color: #8aa0b5;
  font-style: normal;
  font-weight: 900;
}
.dev-pipeline-step {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 210px;
  padding: 7px 9px;
  border: 1px solid #c8d7e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(16, 42, 67, .06);
}
.dev-pipeline-step strong {
  color: #102a43;
  font-size: 12px;
  line-height: 1.25;
}
.dev-pipeline-step small {
  color: #5d6b7a;
  font-size: 11px;
  line-height: 1.25;
}
.dev-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #c8d7e4;
  border-radius: 999px;
  background: #ffffff;
  color: #334e68;
  font-size: 11px;
  font-weight: 800;
}
.dev-status-pill strong {
  color: #102a43;
  font-weight: 900;
}
.dev-status-pill.ok {
  border-color: #a7d8bb;
  background: #f0fbf5;
}
.dev-status-pill.muted {
  background: #f2f6fa;
  color: #66788a;
}
.dev-debug-group {
  border-top: 1px solid #d7e4ee;
  padding: 0;
}
.dev-debug-group > summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  list-style: none;
}
.dev-debug-group > summary::-webkit-details-marker {
  display: none;
}
.dev-debug-group > summary::marker {
  content: "";
}
.dev-debug-group > summary::after {
  content: "+";
  float: right;
  color: #5d6b7a;
}
.dev-debug-group[open] > summary::after {
  content: "-";
}
.dev-debug-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}
.dev-debug-section h4 {
  margin: 0 0 6px;
  color: #102a43;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.dev-debug-section ul {
  margin: 0;
  padding-left: 18px;
}
.dev-debug-section details {
  margin-top: 8px;
}
.dev-debug-section details > summary {
  cursor: pointer;
  padding: 6px 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}
.dev-debug-card {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #d7e4ee;
  border-radius: 6px;
  background: #fff;
}
.dev-debug-card strong,
.dev-debug-card span,
.dev-debug-card small {
  display: block;
  margin-bottom: 4px;
}
.dev-source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dev-source-tags button {
  border: 1px solid #b9cfe0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.dev-source-tags button:hover,
.dev-source-tags button:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .18);
}
.visual-debug-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #5d6b7a;
  font-size: 12px;
  font-weight: 800;
}
.visual-debug-item pre,
.dev-debug-panel pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #102a43;
  color: #e5f2ff;
  white-space: pre-wrap;
  font: 12px/1.45 Consolas, "Liberation Mono", monospace;
}
.citation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  margin: 0 2px;
  border: 1px solid #94b8d4;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  vertical-align: baseline;
}
.citation-link:hover,
.citation-link:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .2);
}
.message.user {
  align-self: flex-end;
  background: var(--navy-2);
  color: #fff;
}
.message.assistant {
  align-self: flex-start;
  background: #eef4f8;
  border-left: 4px solid var(--orange);
  color: var(--text);
}
.message.system {
  align-self: center;
  max-width: min(760px, 88%);
  background: #f7fafc;
  border: 1px dashed #b9cfe0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.message.message-has-audio {
  width: min(420px, 88%);
  max-width: min(420px, 88%);
}
.message.message-has-audio .message-text,
.message.message-has-audio .message-attachments {
  width: 100%;
  min-width: 0;
}
.message-links,
.rag-chip-row,
.tag-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.row-label {
  display: inline-flex;
  align-items: center;
  color: #5d6b7a;
  font-size: 13px;
  font-weight: 900;
  margin-right: 2px;
}
.message-links button,
.rag-chip-row button {
  border: 1px solid #b9cfe0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.rag-chip-row button.selected {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.composer {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.composer-row {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: end;
  min-width: 0;
}
.composer textarea {
  resize: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font: inherit;
  min-height: 64px;
  min-width: 0;
}
.composer.composer-busy textarea {
  border-color: #f2b94b;
}
.composer.drag-over {
  background: #eaf5ff;
}
.icon-btn {
  border: 1px solid #c7d8eb;
  background: #f7fbff;
  color: var(--navy);
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}
.composer-row .icon-btn,
.composer-row .send-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
}
.composer-row .send-icon-btn {
  width: 52px;
  min-width: 52px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #1a1a1a;
}
.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.composer-row .send-icon-btn .ui-icon {
  width: 21px;
  height: 21px;
}
.icon-btn.recording {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
.icon-btn:hover,
.icon-btn:focus-visible,
.send-icon-btn:hover,
.send-icon-btn:focus-visible,
.attachment-remove-btn:hover,
.attachment-remove-btn:focus-visible {
  outline: 0;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 165, 31, .18);
}
.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-chip {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #c7d8eb;
  background: #fff;
  border-radius: 6px;
  padding: 6px 40px 6px 6px;
  max-width: 320px;
  min-width: 220px;
}
.attachment-chip img,
.attachment-chip video {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: #dbe8f5;
}
.attachment-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: #dbe8f5;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}
.attachment-icon.audio .ui-icon {
  width: 22px;
  height: 22px;
}
.attachment-chip strong,
.attachment-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip small {
  color: var(--muted);
  font-size: 11px;
}
.attachment-chip button {
  border: 1px solid #c7d8eb;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 900;
}
.attachment-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(7, 28, 46, .08);
}
.attachment-remove-btn .remove-x,
.attachment-remove-btn .remove-x::before,
.attachment-remove-btn .remove-x::after {
  display: block;
}
.attachment-remove-btn .remove-x {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.attachment-remove-btn .remove-x::before,
.attachment-remove-btn .remove-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}
.attachment-remove-btn .remove-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.attachment-remove-btn .remove-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.attachment-remove-btn .ui-icon {
  width: 17px;
  height: 17px;
}
.attachment-progress {
  --progress: 0;
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 55%, transparent 56%),
    conic-gradient(var(--orange) calc(var(--progress) * 1%), #dbe8f5 0);
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #c7d8eb;
}
.attachment-progress span {
  transform: translateY(.5px);
}
.attachment-progress.finalizing {
  background:
    radial-gradient(circle at center, #fff 55%, transparent 56%),
    conic-gradient(var(--orange) 0 28%, #dbe8f5 0 100%);
  animation: attachment-progress-spin .85s linear infinite;
}
@keyframes attachment-progress-spin {
  to {
    transform: rotate(360deg);
  }
}
.message-attachments {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.message-image-attachment,
.message-video-attachment,
.message-file-attachment {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}
.message-image-attachment {
  display: grid;
  gap: 6px;
  width: min(520px, 100%);
  padding: 0;
  text-align: left;
  cursor: zoom-in;
  overflow: hidden;
}
.message-image-attachment img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 8px;
}
.message-image-attachment span {
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  padding: 0 2px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message.assistant .message-image-attachment span {
  color: var(--muted);
}
.message-video-attachment {
  display: grid;
  gap: 6px;
  width: min(520px, 100%);
}
.message-video-attachment video {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  background: #000;
}
.message-video-attachment button {
  justify-self: start;
  border: 1px solid rgba(255,255,255,.45);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.message-audio-attachment {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}
.message-audio-attachment audio {
  display: block;
  width: 100%;
  min-width: 240px;
  max-width: 100%;
}
.message.assistant .message-audio-attachment {
  border: 1px solid rgba(12, 47, 81, 0.14);
  background: rgba(255, 255, 255, 0.65);
}
.message-file-attachment {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(12, 47, 81, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}
.message-file-attachment .attachment-icon {
  width: 52px;
  height: 52px;
}
.message-file-attachment strong,
.message-file-attachment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-attachment-status {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
.message-attachment-status.error {
  color: #ffd3cf;
}
.message-attachment-status.pending {
  color: #ffe7b3;
}
.message.assistant .message-attachment-status,
.message-file-attachment .message-attachment-status {
  color: var(--muted);
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.message-file-attachment .message-attachment-status.error {
  color: var(--bad);
}
.message-file-attachment .message-attachment-status.pending {
  color: #8a5a00;
}
.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(5, 15, 25, .86);
}
.media-viewer.open {
  display: grid;
}
.media-viewer-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.media-viewer-stage img,
.media-viewer-stage video {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.media-viewer-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.inspector {
  overflow: auto;
  min-height: 0;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}
.inspector-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.inspector-section:last-child { border-bottom: 0; }
.inspector-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 2px;
}
.inspector-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}
.inspector-toggle button.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(9, 45, 72, .12);
}
.inspector-subpanel[hidden] {
  display: none;
}
.chat-cost-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}
.customer-toggle {
  margin-top: 10px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.section-title h2,
.inspector h2,
.case-review-head h2,
.json-panel h2 {
  margin: 0;
  font-size: 18px;
}
.profile-summary,
.profile-fields {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.profile-row,
.profile-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #edf2f5;
}
.profile-row span,
.profile-field span {
  color: var(--muted);
}
.profile-row strong,
.profile-field strong,
.profile-value {
  color: var(--text);
  overflow-wrap: anywhere;
}
.profile-quote-map {
  display: grid;
  gap: 8px;
}
.profile-quote-map div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbff;
}
.profile-quote-map span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}
.profile-quote-map strong {
  color: var(--text);
  font-weight: 800;
}
.missing-value {
  color: #7a8794;
}
.value-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.value-chip {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6fc;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.question-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.question-list li {
  line-height: 1.4;
}
.evidence-list,
.case-evidence,
.case-cost-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}
.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  transition: background .25s, border-color .25s;
  cursor: default;
}
.evidence-card.highlight {
  background: #fff8e8;
  border-color: var(--orange);
}
.evidence-card.selected {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
}
.evidence-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.evidence-card.compact p {
  max-height: 74px;
  overflow: hidden;
}
.evidence-card h3 {
  margin: 4px 0 6px;
  color: var(--navy);
  font-size: 15px;
}
.evidence-card p {
  margin: 0;
  color: #354658;
  line-height: 1.45;
  font-size: 14px;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow: auto;
}
.source-id {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.source-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.source-icon-btn:hover,
.source-icon-btn:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .2);
}
.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.source-actions button,
.source-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  padding: 5px 9px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.source-actions button:hover,
.source-actions a:hover,
.source-actions button:focus-visible,
.source-actions a:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .2);
}
.muted { color: var(--muted); }

.case-review-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 390px;
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.case-list-panel {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.case-list-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
}
.case-list-panel .case-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.case-list-panel .case-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}
.case-list-panel .case-item.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.case-list-panel .case-item strong {
  color: var(--navy);
  font-size: 14px;
}
.case-list-panel .case-item span:not(.case-status) {
  color: #40566d;
  font-size: 12px;
}
.case-list-panel .sidebar-loading {
  border: 1px dashed #c7d8eb;
  background: #f8fbfd;
  color: var(--muted);
}
.case-thread,
.case-rag-panel {
  min-height: 0;
  overflow: auto;
}
.case-rag-panel {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}
.quotation-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.quotation-list-panel,
.quotation-workspace-panel {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}
.quotation-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.quotation-list-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
}
.quotation-source-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.quotation-source-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}
.quotation-source-item.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.quotation-source-item strong {
  font-size: 14px;
  line-height: 1.25;
}
.quotation-source-item span,
.quotation-source-item em {
  color: #40566d;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}
.quotation-workspace-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}
.quotation-workflow-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.case-side-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.case-side-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.case-profile-json {
  margin-top: 10px;
  border: 1px solid #edf2f5;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px 10px;
}
.case-profile-json summary {
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.case-profile-json pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #354658;
  font-size: 12px;
}
.case-review-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}
.case-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 10px;
  margin-top: 12px;
}
.case-filter-row input,
.case-filter-row select {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.case-messages {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #eef4f8 0%, #f7fafc 100%);
}
.case-message {
  width: min(760px, 82%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(8, 36, 59, .06);
  min-width: 0;
}
.case-message.customer {
  justify-self: end;
  background: #dff8e9;
  border-color: #93d9b0;
  border-right: 5px solid #067647;
}
.case-message.seller {
  justify-self: start;
  background: var(--navy-2);
  border-color: #0b395c;
  border-left: 5px solid var(--orange);
  color: #fff;
}
.case-message p {
  margin: 8px 0 0;
  line-height: 1.5;
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.case-message.highlight {
  outline: 3px solid rgba(248, 166, 27, .62);
  box-shadow: 0 0 0 6px rgba(248, 166, 27, .14), 0 2px 8px rgba(8, 36, 59, .06);
}
.case-bubble-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.case-bubble-head strong {
  color: var(--navy);
  font-size: 13px;
}
.case-bubble-head span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}
.case-message.seller .case-bubble-head strong,
.case-message.seller p {
  color: #fff;
}
.case-message.seller .case-bubble-head span {
  color: #c9d9e6;
}
.context-callback {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(185, 207, 224, .78);
}
.case-message.seller .context-callback {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}
.context-callback > div {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.context-callback span {
  color: #53687c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.case-message.seller .context-callback span {
  color: #c9d9e6;
}
.context-callback p {
  margin-top: 6px;
  color: #46586a;
  font-size: 13px;
  line-height: 1.35;
}
.case-message.seller .context-callback p {
  color: #dbe9f3;
}
.context-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.context-jump-btn {
  border: 1px solid #b9cfe0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}
.context-jump-btn:hover,
.context-jump-btn:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .22);
}
.case-message.seller .tag {
  color: var(--navy);
  background: #dceefa;
}
.case-message.seller .quality.MIXED {
  color: #7a2e04;
  background: #ffe3b0;
}
.tag,
.quality,
.evidence-role,
.case-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 900;
}
.evidence-role {
  color: #344054;
  background: #f2f4f7;
}
.tag {
  color: var(--navy);
  background: #e7f1f8;
}
.quality.DESIRABLE,
.case-status.successful {
  color: var(--good);
  background: var(--good-bg);
}
.quality.MIXED {
  color: var(--mixed);
  background: var(--mixed-bg);
}
.quality.UNDESIRABLE {
  color: var(--bad);
  background: var(--bad-bg);
}
.quality.NEUTRAL {
  color: #344054;
  background: #eaecf0;
}
.training-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}
.training-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid transparent;
}
.training-badge.desirable {
  color: var(--good);
  background: var(--good-bg);
  border-color: #8ee0ad;
}
.training-badge.undesirable {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: #f7aaa6;
}
.training-badge.review {
  color: var(--mixed);
  background: var(--mixed-bg);
  border-color: #f5cd86;
}
.training-badge.context_only,
.training-badge.unclassified {
  color: #344054;
  background: #eef2f6;
  border-color: #d8e1e8;
}
.training-reason {
  color: #65778a;
  font-size: 12px;
  font-weight: 800;
}
.case-message.seller .training-reason {
  color: #c6d6e3;
}
.training-action {
  border: 1px solid #b9cfe0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.training-action.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(248, 166, 27, .16);
}
.training-action:disabled {
  opacity: .6;
  cursor: progress;
}
.case-status.in_progress {
  color: #174a6c;
  background: #dff1fb;
}
.case-status.unsuccessful {
  color: var(--bad);
  background: var(--bad-bg);
}
.case-rag-panel {
  padding: 14px;
}
.source-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.source-picker button {
  border: 1px solid #b9cfe0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.source-picker button.selected {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.docs-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.database-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.docs-list-panel,
.doc-viewer-panel,
.database-list-panel,
.database-record-panel {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.docs-list-panel,
.database-list-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}
.docs-list-panel input,
.database-list-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
}
.document-list,
.doc-section-list,
.database-list,
.database-record-content {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}
.document-item,
.database-item {
  width: 100%;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  text-align: left;
  cursor: pointer;
}
.document-item.active,
.database-item.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.document-item strong,
.document-item span,
.database-item strong,
.database-item span {
  display: block;
}
.document-item strong,
.database-item strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.3;
}
.document-item span,
.database-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.database-record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.database-record-card p {
  margin: 10px 0 14px;
  line-height: 1.55;
}
.database-cell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.database-cell {
  border: 1px solid #e1e8ee;
  border-radius: 6px;
  padding: 9px;
  min-width: 0;
  background: #f8fbfd;
}
.database-cell span,
.database-cell strong {
  display: block;
  overflow-wrap: anywhere;
}
.database-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.database-cell strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
}
.doc-index-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
}
.doc-index-badge.indexed {
  background: var(--good-bg);
  color: var(--good);
}
.doc-index-badge.listed {
  background: #eef2f6;
  color: #475467;
}
.doc-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
  align-items: center;
}
.doc-source-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6fc;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.doc-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.doc-view-toggle button {
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.doc-view-toggle button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.doc-view-toggle button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.json-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 14px;
  height: min(980px, calc(100vh - 144px));
  min-width: 0;
}
.json-list-panel,
.json-viewer-panel {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}
.json-list-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
}
.json-list-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
}
.synthetic-upload-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e6f3;
  border-radius: 8px;
  background: #f7fbff;
  padding: 8px;
}
.synthetic-upload-bar .text-btn {
  min-height: 34px;
  padding: 6px 10px;
}
.synthetic-upload-bar .mini-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.json-convo-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.json-convo-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}
.json-convo-card.synthetic-convo-card {
  padding: 0;
  overflow: hidden;
  cursor: default;
  min-height: 92px;
}
.json-convo-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  padding: 11px 44px 11px 11px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.json-convo-card.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.json-convo-card strong,
.json-convo-card span,
.json-convo-card small {
  display: block;
  line-height: 1.35;
}
.json-convo-card strong {
  font-size: 14px;
  font-weight: 900;
}
.json-convo-card span {
  margin-top: 5px;
  color: #40566d;
  font-size: 12px;
}
.json-convo-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.synthetic-delete-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #c7d8eb;
  border-radius: 7px;
  background: #fff;
  color: #7a271a;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(7, 28, 46, .08);
}
.synthetic-delete-btn .ui-icon {
  width: 17px;
  height: 17px;
}
.synthetic-delete-btn:hover,
.synthetic-delete-btn:focus-visible {
  outline: 0;
  border-color: #f04438;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, .14);
}
.json-viewer-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
}
.json-convo-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.json-convo-meta > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 9px 10px;
  min-width: 0;
}
.json-convo-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.json-convo-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.json-meta-detail-card {
  grid-column: 1 / -1;
  position: relative;
  padding-right: 52px !important;
}
.json-info-details summary {
  list-style: none;
  cursor: pointer;
}
.json-info-details summary::-webkit-details-marker {
  display: none;
}
.json-info-details summary::marker {
  content: "";
}
.json-info-details summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 6px rgba(8, 36, 59, .08);
}
.json-info-details summary .ui-icon {
  width: 18px;
  height: 18px;
}
.json-info-details[open] summary {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(248, 166, 27, .14);
}
.json-info-details pre {
  margin: 10px 0 0;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #163047;
  background: #fff;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  padding: 11px;
}
.json-meta-info summary {
  position: absolute;
  top: 10px;
  right: 10px;
}
.json-parse-error {
  grid-column: 1 / -1;
}
.json-convo-messages {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #eef4f8 0%, #f7fafc 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.json-message {
  width: min(760px, 82%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 52px 12px 14px;
  box-shadow: 0 2px 8px rgba(8, 36, 59, .06);
  min-width: 0;
  position: relative;
}
.json-message.customer {
  justify-self: end;
  background: #dff8e9;
  border-color: #93d9b0;
  border-right: 5px solid #067647;
}
.json-message.seller {
  justify-self: start;
  background: var(--navy-2);
  border-color: #0b395c;
  border-left: 5px solid var(--orange);
  color: #fff;
}
.json-message.system,
.json-message.unknown {
  justify-self: center;
  width: min(620px, 76%);
  background: #eef2f6;
  color: #425466;
}
.json-message p {
  margin: 8px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.json-message.seller .case-bubble-head strong,
.json-message.seller .case-bubble-head span,
.json-message.seller p {
  color: #fff;
}
.json-message-info summary {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  color: #24435d;
}
.json-message-info summary .ui-icon {
  width: 16px;
  height: 16px;
}
.json-message-info pre {
  margin-top: 10px;
}
.json-message.seller .json-message-info summary {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
.json-message.seller .json-message-info pre {
  background: rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.18);
  color: #e5f0f8;
}
.json-message.highlight {
  outline: 3px solid rgba(248, 166, 27, .62);
  box-shadow: 0 0 0 6px rgba(248, 166, 27, .14), 0 2px 8px rgba(8, 36, 59, .06);
}
.json-quote,
.json-translation,
.json-attachments,
.json-note {
  margin-top: 8px;
  border-radius: 6px;
  padding: 8px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(185, 207, 224, .78);
  color: #46586a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.json-translation {
  font-size: 13px;
  line-height: 1.45;
}
.json-translation span {
  display: block;
  margin-bottom: 3px;
  color: #66788a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.json-translation.pending {
  color: #66788a;
  font-style: italic;
}
.json-message.seller .json-quote,
.json-message.seller .json-translation,
.json-message.seller .json-attachments,
.json-message.seller .json-note {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
  color: #dbe9f3;
}
.json-message.seller .json-translation span {
  color: #bcd5e8;
}
.raw-json-preview {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.text-btn.disabled {
  pointer-events: none;
  opacity: .45;
}

.playbook-layout {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.playbook-inner-tabs {
  margin-bottom: 12px;
}
.playbook-subpanel {
  display: none;
}
.playbook-subpanel.active {
  display: block;
  height: calc(100vh - 210px);
  min-height: 0;
}
.playbook-subpanel .playbook-layout {
  height: 100%;
}
.playbook-list-panel,
.playbook-detail-panel {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}
.playbook-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.playbook-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 8px;
}
.playbook-toolbar input,
.playbook-toolbar select,
.playbook-issue-panel textarea,
.playbook-test-panel textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.playbook-section-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  padding-right: 4px;
}
.playbook-section-group {
  display: grid;
  gap: 8px;
}
.playbook-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.playbook-section-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}
.playbook-section-head span,
.playbook-tactic-item em {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--navy);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
  font-style: normal;
}
.playbook-section-group p {
  margin: 0;
  color: #526477;
  font-size: 12px;
  line-height: 1.4;
}
.playbook-tactic-list {
  display: grid;
  gap: 8px;
}
.playbook-tactic-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 11px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 5px;
}
.playbook-tactic-item.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.playbook-tactic-item.has-issue {
  border-color: #fca5a5;
}
.playbook-tactic-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.playbook-tactic-item strong {
  font-size: 14px;
  line-height: 1.25;
}
.playbook-tactic-item small {
  color: #40566d;
  font-size: 12px;
  line-height: 1.35;
}
.playbook-tactic-item.has-issue em {
  width: fit-content;
  background: var(--bad-bg);
  color: var(--bad);
}
.playbook-detail-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
}
.answer-plan-detail-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.status-pill.issue {
  background: var(--bad-bg);
  color: var(--bad);
}
.playbook-detail-content {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  padding-right: 4px;
}
.playbook-hero-card,
.playbook-detail-card,
.playbook-issue-panel,
.playbook-test-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}
.playbook-hero-card {
  border-left: 4px solid var(--orange);
  background: #fffaf0;
}
.playbook-hero-card.has-issue {
  border-left-color: var(--bad);
  background: #fff5f5;
}
.playbook-hero-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.playbook-hero-card p {
  margin: 6px 0 0;
  color: var(--navy);
  line-height: 1.5;
}
.playbook-hero-card blockquote {
  margin: 10px 0 0;
  border-left: 3px solid var(--bad);
  padding-left: 10px;
  color: #7f1d1d;
}
.playbook-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.answer-plan-detail-grid .answer-plan-text-card,
.answer-plan-detail-grid .answer-plan-guidance-card {
  grid-column: 1 / -1;
}
.answer-plan-text-card p {
  margin: 0;
  color: #35485a;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-plan-guidance-list {
  display: grid;
  gap: 10px;
}
.playbook-detail-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 15px;
}
.playbook-detail-card ul {
  margin: 0;
  padding-left: 18px;
  color: #35485a;
  line-height: 1.45;
}
.playbook-detail-card li + li {
  margin-top: 6px;
}
.playbook-examples-card {
  grid-column: 1 / -1;
}
.playbook-example-list {
  display: grid;
  gap: 10px;
}
.playbook-example-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 11px;
}
.playbook-example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.playbook-example-head strong {
  color: var(--navy);
  line-height: 1.3;
}
.playbook-example-card p {
  margin: 0;
  color: #2f4154;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.playbook-example-card p span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.playbook-example-card ul {
  margin: 0;
  padding-left: 18px;
}
.playbook-derived-response {
  border: 1px solid #b9cfe0;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.playbook-test-panel {
  display: grid;
  gap: 10px;
  background: #f8fbfd;
}
.playbook-test-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  background: #fff;
}
.playbook-test-result {
  display: grid;
  gap: 10px;
  min-height: 42px;
}
.playbook-test-answer {
  border: 1px solid #b9cfe0;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.playbook-test-answer.expected {
  border-left-color: #2b8a3e;
  background: #f3fff7;
}
.playbook-test-answer span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.playbook-test-answer p {
  margin: 6px 0 0;
  color: var(--navy);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.playbook-test-sources {
  display: grid;
  gap: 8px;
}
.playbook-test-sources button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}
.playbook-test-sources button strong,
.playbook-test-sources button small {
  display: block;
  overflow-wrap: anywhere;
}
.playbook-test-sources button small {
  margin-top: 3px;
  color: var(--muted);
}
.playbook-issue-panel {
  display: grid;
  gap: 8px;
  background: #f8fbfd;
}
.playbook-issue-panel label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.playbook-issue-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 86px;
}
.playbook-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qa-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-width: 0;
}
.qa-list-panel,
.qa-detail-panel {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}
.qa-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.qa-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
}
.qa-toolbar input,
.qa-toolbar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.qa-case-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.qa-case-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}
.qa-case-card.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.qa-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.qa-card-top strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}
.qa-case-card small {
  display: block;
  margin-top: 6px;
  color: #40566d;
  font-size: 12px;
  line-height: 1.35;
}
.qa-score,
.qa-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.qa-score.ready,
.qa-status.ready {
  background: var(--good-bg);
  color: var(--good);
}
.qa-score.light,
.qa-status.light {
  background: #fff5db;
  color: #8a5a00;
}
.qa-score.cleanup,
.qa-status.cleanup {
  background: #fff1e8;
  color: #a43f00;
}
.qa-score.broken,
.qa-status.broken {
  background: var(--bad-bg);
  color: var(--bad);
}
.qa-status {
  margin-top: 8px;
}
.qa-detail-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.qa-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.qa-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
  min-width: 0;
}
.qa-summary-card.score {
  border-left: 4px solid var(--orange);
}
.qa-summary-card.score.ready { background: #f3fff7; }
.qa-summary-card.score.light { background: #fffaf0; }
.qa-summary-card.score.cleanup { background: #fff7f1; }
.qa-summary-card.score.broken { background: #fff5f5; }
.qa-summary-card span,
.qa-summary-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.qa-summary-card strong {
  display: block;
  margin: 6px 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.qa-detail-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  padding-right: 4px;
}
.qa-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}
.qa-detail-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 16px;
}
.qa-chip-list,
.qa-issue-list,
.qa-action-list,
.qa-role-bars {
  display: grid;
  gap: 8px;
}
.qa-topic-chip,
.qa-action,
.qa-issue {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.qa-topic-chip strong,
.qa-issue strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}
.qa-topic-chip span,
.qa-issue span {
  display: block;
  margin-top: 4px;
  color: #40566d;
  font-size: 13px;
  line-height: 1.4;
}
.qa-issue.critical,
.qa-issue.high {
  border-left: 4px solid var(--bad);
}
.qa-issue.medium {
  border-left: 4px solid var(--orange);
}
.qa-issue.low {
  border-left: 4px solid #98a2b3;
}
.qa-label-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #eef6fc;
  color: var(--navy);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}
.qa-action {
  color: #20364b;
  font-size: 13px;
  line-height: 1.4;
}
.qa-role-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}
.qa-role-row strong,
.qa-role-row span,
.qa-role-row small {
  display: block;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.25;
}
.qa-role-row span,
.qa-role-row small {
  color: var(--muted);
}
.qa-role-track {
  height: 9px;
  border-radius: 999px;
  background: #e5edf3;
  overflow: hidden;
}
.qa-role-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.doc-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  transition: border-color .25s, background .25s;
}
.doc-section-card.active,
.doc-section-card.highlight {
  border-color: var(--orange);
  background: #fff8e8;
  box-shadow: inset 4px 0 0 var(--orange);
}
.doc-section-card h3 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-size: 17px;
}
.doc-section-card p {
  margin: 0;
  color: #26384a;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.doc-text-block {
  margin: 0;
  overflow-wrap: anywhere;
  color: #26384a;
  font: inherit;
  line-height: 1.58;
}
.doc-text-block p {
  margin: 0 0 10px;
}
.doc-text-block p:last-child {
  margin-bottom: 0;
}
.doc-table-caption {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e5ee;
  border-radius: 8px;
  margin: 6px 0 12px;
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #fff;
}
.doc-table th,
.doc-table td {
  border-bottom: 1px solid #e4edf4;
  border-right: 1px solid #e4edf4;
  padding: 9px 10px;
  vertical-align: top;
  text-align: left;
  line-height: 1.42;
}
.doc-table th:last-child,
.doc-table td:last-child {
  border-right: 0;
}
.doc-table tr:last-child td {
  border-bottom: 0;
}
.doc-table th {
  background: var(--navy-2);
  color: #fff;
  font-weight: 900;
}
.doc-table td:first-child {
  width: 30%;
  color: var(--navy);
  font-weight: 850;
  background: #f7fbff;
}
.doc-full-card {
  max-width: 980px;
}
.translation-note {
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f7fbff;
  color: #496175;
  padding: 10px 12px;
  margin: 0 0 2px;
  line-height: 1.45;
}

.evaluation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}
.evaluation-inner-tabs {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 6px;
  border: 1px solid #cfe0ec;
  border-radius: 10px;
  background: #eef6fc;
}
.evaluation-inner-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  padding: 8px 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.evaluation-inner-tab.active {
  border-color: #e2edf5;
  background: #fff;
  box-shadow: 0 1px 0 rgba(10, 36, 57, .04);
}
.evaluation-inner-tab:focus-visible {
  outline: 3px solid rgba(242, 165, 31, .28);
  outline-offset: 2px;
}
.evaluation-subpanel {
  display: none;
}
.evaluation-subpanel.active {
  display: block;
  height: calc(100vh - 210px);
  min-height: 0;
}
.evaluation-main,
.evaluation-inspector {
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.evaluation-main {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}
.evaluation-inspector {
  overflow: auto;
  padding: 14px;
}
.evaluation-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.evaluation-head h2 {
  margin: 2px 0 4px;
  color: var(--navy);
}
.evaluation-head p {
  margin: 0;
  color: var(--muted);
}
.evaluation-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}
.evaluation-toolbar select,
.evaluation-toolbar button,
.eval-nav button {
  min-height: 34px;
  border: 1px solid #b9cfe0;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  padding: 7px 10px;
  font: inherit;
  font-weight: 900;
}
.evaluation-toolbar button {
  cursor: pointer;
}
.evaluation-toolbar button.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #151515;
}
.evaluation-toolbar button:disabled,
.eval-nav button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.evaluation-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.eval-metric {
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.eval-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.eval-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 22px;
}
.evaluation-viewer {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.system-chats-section {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  background: #fff;
}
.system-chats-head {
  align-items: start;
}
.system-chats-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.system-chats-section .evaluation-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0;
  border-bottom: 0;
}
.system-chats-viewer {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.system-chats-list {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
  border-right: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  background: #fbfdff;
}
.system-chat-run {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  color: var(--text);
}
button.system-chat-run {
  cursor: pointer;
}
.system-chat-run.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.system-chat-run strong,
.system-chat-run span {
  display: block;
}
.system-chat-run strong {
  color: var(--navy);
  line-height: 1.25;
}
.system-chat-run span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.system-chats-detail {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.system-chats-detail-body {
  display: grid;
  gap: 12px;
}
.system-chat-audit {
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfd;
}
.system-chat-audit.pass {
  border-color: #75c89b;
  background: #f4fbf7;
}
.system-chat-audit.mixed {
  border-color: #f2c46a;
  background: #fffaf0;
}
.system-chat-audit.fail {
  border-color: #f6a7a1;
  background: #fff7f6;
}
.system-chat-audit div,
.system-chat-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}
.system-chat-audit strong {
  color: var(--navy);
}
.system-chat-audit span,
.system-chat-agents span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.system-chat-audit ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.system-chat-audit p {
  margin: 8px 0 0;
  color: var(--muted);
}
.system-chat-audit.compact {
  padding: 9px;
}
.system-chat-review-grid {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  min-height: 0;
}
.system-chat-transcript,
.system-chat-profile-state {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}
.system-chat-profile-state .profile-value,
.system-chat-profile-state .value-chip,
.system-chat-profile-state .invoice-item-preview {
  min-width: 0;
  overflow-wrap: anywhere;
}
.system-chat-bubble-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 390px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.system-chat-message {
  width: 100%;
  border: 1px solid #cfe0ec;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 4px 0 0 #9dd6ba;
}
.system-chat-message.active {
  border-color: var(--orange);
  background: #fffaf0;
  box-shadow: inset 4px 0 0 var(--orange);
}
.system-chat-message span,
.system-chat-message em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.system-chat-message p {
  margin: 7px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.system-chat-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.system-chat-profile-head h3 {
  margin: 2px 0 0;
  color: var(--navy);
}
.system-chat-profile-block {
  display: grid;
  gap: 8px;
}
.system-chat-expected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.profile-field.compact {
  min-height: auto;
}
.system-chats-detail h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}
.eval-run-list {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.eval-run-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.eval-run-item.active {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
  background: #fffaf0;
}
.eval-run-item strong,
.eval-run-item span {
  display: block;
}
.eval-run-item strong {
  color: var(--navy);
  line-height: 1.25;
}
.eval-run-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.eval-attempt-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.eval-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.eval-selected-meta {
  flex: 1;
  min-width: 220px;
  color: var(--navy);
  font-weight: 900;
}
.eval-nav-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}
.eval-transcript {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(90deg, #f8fbfd, #fff);
}
.eval-turn-block {
  display: grid;
  gap: 12px;
}
.eval-burst {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.eval-burst h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 14px;
  text-transform: uppercase;
}
.eval-burst.customer {
  border-color: #9dd6ba;
  background: #ecfff4;
}
.eval-burst.bot {
  border-color: #b9cfe0;
  background: #eef6fc;
  border-left: 4px solid var(--orange);
}
.eval-burst.expected {
  border-color: #16496d;
  background: #0f3b5e;
  color: #fff;
  cursor: default;
}
.eval-burst.expected:hover,
.eval-burst.expected:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(242, 165, 31, .22);
}
.eval-burst.expected h3 {
  color: #d6ecff;
}
.eval-line {
  margin: 7px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.eval-line-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.eval-burst.expected .eval-line-meta {
  color: #bfe1f8;
}
.eval-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.eval-source-chips button {
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 5px 9px;
  cursor: pointer;
  font-weight: 900;
}
.eval-comparison {
  display: grid;
  gap: 10px;
}
.eval-score {
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}
.eval-score.pass { border-color: #75c89b; background: #ecfff4; }
.eval-score.mixed { border-color: #f2c46a; background: #fff8e8; }
.eval-score.fail { border-color: #f6a7a1; background: #fff4f2; }
.eval-score strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
}
.eval-issue-list {
  display: grid;
  gap: 8px;
}
.eval-issue-list h3 {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: 14px;
}
.eval-issue-list ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
}
.eval-rubric,
.eval-rubric-list,
.eval-rubric-score-list,
.eval-blocker-list {
  display: grid;
  gap: 8px;
}
.eval-rubric-item,
.eval-rubric-score {
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 9px;
}
.eval-rubric-item div,
.eval-rubric-score div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--navy);
}
.eval-rubric-item strong,
.eval-rubric-score strong {
  font-size: 13px;
}
.eval-rubric-item span,
.eval-rubric-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.eval-rubric-item p,
.eval-rubric-score p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}
.eval-rubric-score.pass { border-color: #75c89b; }
.eval-rubric-score.mixed { border-color: #f2c46a; }
.eval-rubric-score.fail { border-color: #f6a7a1; }
.eval-blocker-list span {
  border: 1px solid #f2c46a;
  border-radius: 999px;
  background: #fff8e8;
  color: var(--navy);
  padding: 6px 8px;
  font-size: 12px;
}
.eval-empty {
  color: var(--muted);
  padding: 14px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(0, 520px);
  gap: 14px;
  height: calc(100vh - 144px);
  min-height: 0;
}
.profile-list-panel,
.profile-fields-panel,
.json-panel {
  padding: 16px;
  min-height: 0;
  overflow: auto;
}
.profile-list-title {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.profile-list-heading {
  display: grid;
  gap: 3px;
}
.profile-list-heading h2 {
  font-size: 21px;
  line-height: 1.1;
}
.profile-list-heading .mini-label {
  font-size: 11px;
}
.profile-customer-list {
  display: grid;
  gap: 8px;
  min-height: 0;
}
.profile-customer-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.profile-customer-item.active,
.profile-customer-item:hover {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.profile-customer-item strong,
.profile-customer-item span,
.profile-customer-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-customer-item strong {
  color: var(--navy);
  font-size: 14px;
}
.profile-customer-item span,
.profile-customer-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.background-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 144px);
  min-height: 0;
}
.background-list-panel,
.background-report-panel {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.background-list-panel {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  gap: 12px;
}
.outreach-list-panel {
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
}
.background-list-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.background-readiness-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid #d9e6ef;
  border-radius: 8px;
  background: #f5f8fb;
}
.background-readiness-filter button {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  padding: 7px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}
.background-readiness-filter button::after {
  content: attr(data-count);
  display: inline-block;
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
}
.background-readiness-filter button.active,
.background-readiness-filter button:hover {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.outreach-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.outreach-query-row textarea {
  resize: vertical;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  min-width: 0;
}
.background-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.background-profile-browser-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px 12px;
  min-width: 0;
}
.background-profile-browser-bar div {
  min-width: 0;
}
.background-profile-browser-bar strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.1;
}
.background-profile-browser-bar em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.background-source-import {
  padding: 0;
}
.background-source-import summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 12px 14px;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}
.background-source-import form {
  padding: 0 14px 14px;
}
.background-empty-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.background-empty-profile-grid section {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}
.background-empty-profile-grid h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 13px;
}
.background-empty-profile-grid p,
.background-empty-profile-grid li,
.background-empty-profile-grid a,
.background-empty-profile-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.background-empty-profile-grid a {
  display: grid;
  gap: 3px;
  text-decoration: none;
}
.background-empty-profile-grid strong {
  color: var(--navy);
}
.background-empty-profile-grid ol {
  margin: 0;
  padding-left: 18px;
}
.background-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.background-title-actions .text-btn {
  min-height: 34px;
  padding-inline: 10px;
}
.background-stat-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.background-stat-card.wide {
  grid-column: 1 / -1;
}
.background-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.background-stat-card strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
}
.background-stat-card em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.background-audit-queue {
  min-width: 0;
}
.background-audit-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}
.background-audit-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}
.background-audit-head strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}
.background-audit-head em,
.background-audit-note {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}
.background-audit-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.background-audit-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #d7e4ef;
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.background-audit-item:hover {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.background-audit-item strong,
.background-audit-item span,
.background-audit-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-audit-item strong {
  color: var(--navy);
  font-size: 12px;
}
.background-audit-item span,
.background-audit-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.background-audit-note {
  margin: 8px 0 0;
}
.background-executive-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.background-executive-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid #c8d8e6;
  border-radius: 999px;
  background: #fff;
  color: #526477;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}
.background-executive-strip strong {
  color: var(--navy);
  font-size: 13px;
}
.background-hold-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.background-hold-bucket {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: start;
  min-width: 0;
  border: 1px solid #d8e4ed;
  border-radius: 8px;
  background: #f7fbfd;
  padding: 8px;
}
.background-hold-bucket strong {
  grid-row: span 2;
  color: var(--navy);
  font-size: 18px;
  line-height: 1;
}
.background-hold-bucket span,
.background-hold-bucket em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-hold-bucket span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.background-hold-bucket em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.background-operator-alert {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border: 1px solid #f2cf8f;
  border-radius: 8px;
  background: #fff8e8;
  padding: 10px 12px;
}
.background-operator-alert strong {
  color: #8a4f00;
  font-size: 12px;
}
.background-operator-alert span {
  color: #5b4630;
  font-size: 12px;
  line-height: 1.45;
}
.background-resolution {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid #dbe8f1;
  padding-top: 10px;
}
.background-resolution-list {
  display: grid;
  gap: 6px;
}
.background-resolution-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.background-resolution-actions .text-btn {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}
.background-resolution-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #ead9b8;
  border-radius: 8px;
  background: #fffaf0;
  padding: 8px 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.background-resolution-item:hover {
  border-color: #e4ad4e;
  background: #fff4d9;
}
.background-resolution-item strong,
.background-resolution-item span,
.background-resolution-item em,
.background-resolution-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-resolution-item strong {
  color: var(--navy);
  font-size: 12px;
}
.background-resolution-item span,
.background-resolution-item em,
.background-resolution-item small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.background-resolution-item .operator-action,
.background-resolution-item .registry-hint {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.background-resolution-item .operator-action {
  color: #5c470f;
}
.background-resolution-item .registry-hint {
  color: #6b4b14;
}
.background-dossier-workplan {
  display: grid;
  gap: 6px;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(194, 144, 58, 0.25);
}
.background-dossier-workplan div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.background-resolution-item .background-dossier-workplan strong,
.background-resolution-item .background-dossier-workplan span,
.background-resolution-item .background-dossier-workplan small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.background-resolution-item .background-dossier-workplan strong {
  color: #163d63;
}
.background-resolution-item .background-dossier-workplan span {
  color: #6b4b14;
}
.background-resolution-item .background-dossier-workplan small {
  color: #6f7890;
}
.background-resolution-item .background-dossier-workplan small.reject-rule {
  color: #9b2c20;
}
.background-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.background-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.background-item.analyst-ready {
  border-left: 4px solid #f8a61b;
}
.background-item.identity-only {
  border-left: 4px solid #f8a61b;
}
.background-item.not-researchable {
  border-left: 4px solid #9aa6b2;
  background: #fbfcfd;
}
.background-item.coverage-complete {
  border-left-color: #1f9d7a;
}
.background-item.coverage-empty {
  border-left-color: #d84a3a;
}
.background-item.coverage-partial:not(.coverage-complete):not(.coverage-empty) {
  border-left-color: #f8a61b;
}
.background-item.active,
.background-item:hover {
  border-top-color: #8eb9d7;
  border-right-color: #8eb9d7;
  border-bottom-color: #8eb9d7;
  background: #eef6fc;
}
.background-item.active.coverage-complete,
.background-item:hover.coverage-complete {
  border-left-color: #1f9d7a;
}
.background-item.active.coverage-empty,
.background-item:hover.coverage-empty {
  border-left-color: #d84a3a;
}
.background-item.active.coverage-partial,
.background-item:hover.coverage-partial {
  border-left-color: #f8a61b;
}
.background-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.background-item-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-item-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.background-item strong,
.background-item span,
.background-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-item strong {
  color: var(--navy);
  font-size: 13px;
}
.background-item span,
.background-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.background-pool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 96px;
  border: 1px solid #c8d8e6;
  border-radius: 999px;
  background: #f4f8fb;
  color: #29445f;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.background-pool-pill.private,
.background-pool-pill.open {
  border-color: #c8d7ff;
  background: #eef3ff;
  color: #28437d;
}
.background-analyst-hero aside .background-pool-pill {
  margin-bottom: 2px;
}
.background-list-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #9fb0c2;
  box-shadow: 0 0 0 3px rgba(159, 176, 194, 0.16);
}
.background-item.coverage-complete .background-list-status-dot {
  background: #16a085;
  box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.16);
}
.background-item.coverage-partial .background-list-status-dot {
  background: #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.16);
}
.background-item.coverage-empty .background-list-status-dot {
  background: #d84a3a;
  box-shadow: 0 0 0 3px rgba(216, 74, 58, 0.14);
}
.background-item-completion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  background: #f7fafc;
  padding: 2px 7px;
  color: #516277;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.background-item-completion.coverage-complete {
  border-color: #bfe5d9;
  background: #eefaf6;
  color: #116b56;
}
.background-item-completion.coverage-partial {
  border-color: #f5d596;
  background: #fff8e8;
  color: #8a5a00;
}
.background-item-completion.coverage-empty {
  border-color: #e4b5ad;
  background: #fff4f2;
  color: #9b2c20;
}
.background-item-completion.scale-gap {
  border-color: #f0c36d;
  background: #fff8e8;
  color: #8a5a00;
}
.background-item-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.background-item-metrics span {
  border: 1px solid #e1ebf3;
  border-radius: 6px;
  background: #f8fbfd;
  padding: 4px 6px;
  color: #516277;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.background-item-metrics strong {
  display: inline;
  color: var(--navy);
  font-size: 12px;
}
.background-readiness-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #ccd8e3;
  border-radius: 999px;
  background: #f7f9fc;
  color: #40566f;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.background-readiness-pill.analyst-ready {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}
.background-readiness-pill.identity-only {
  border-color: #f3cf8a;
  background: #fff8e8;
  color: #8a4f00;
}
.background-readiness-pill.not-researchable {
  border-color: #d4dce5;
  background: #f2f5f8;
  color: #526174;
}
.outreach-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.outreach-item-meta small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #26384d;
  font-size: 12px;
}
.outreach-item-meta .outreach-status-pill {
  flex: 0 0 auto;
}
.background-report-panel {
  background: #fff;
}
.background-report-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.background-report-toolbar h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}
.background-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.background-detail {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}
.background-hero {
  position: relative;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  overflow: hidden;
}
.background-hero::before,
.background-hero::after,
.background-hero .background-orb,
.background-hero .background-glow,
.background-hero .background-avatar,
.background-hero .ai-orb,
.background-hero .ai-glow {
  display: none !important;
  content: none !important;
}
.background-detail :is(.background-orb, .background-glow, .background-avatar, .ai-orb, .ai-glow),
.background-compact-panel :is(.background-orb, .background-glow, .background-avatar, .ai-orb, .ai-glow),
.background-report-panel :is(.background-orb, .background-glow, .background-avatar, .ai-orb, .ai-glow) {
  display: none !important;
}
.background-hero h3 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}
.background-hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 12px 0 0;
  color: #42546a;
  font-size: 15px;
  line-height: 1.6;
}
.background-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.background-score-card {
  border: 1px solid #dbe8f1;
  border-top: 4px solid #2f80aa;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.background-score-card.fit { border-top-color: #1f9d7a; }
.background-score-card.intent { border-top-color: #f8a61b; }
.background-score-card.risk { border-top-color: #d94a38; }
.background-score-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.background-score-card strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 28px;
}
.background-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.background-hero-identity-only {
  border-left: 5px solid #f8a61b;
}
.background-hero-not-researchable {
  border-left: 5px solid #9aa6b2;
}
.background-hero-analyst-ready {
  border-left: 5px solid #1f9d7a;
}
.background-score-card .background-score-sub {
  display: block;
  margin-top: 4px;
  color: #6b7b8f;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}
.background-public-findings {
  border: 1px solid #dbe8f1;
  border-left: 4px solid #1f9d7a;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.background-public-findings h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 17px;
}
.background-public-finding-list {
  display: grid;
  gap: 10px;
}
.background-public-finding {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #dbe8f1;
}
.background-public-finding:first-child {
  padding-top: 0;
  border-top: 0;
}
.background-public-finding a {
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.background-public-finding a:hover,
.background-public-finding a:focus-visible {
  color: var(--blue);
}
.background-public-finding p {
  margin: 0;
  color: #42546a;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.background-analyst-readiness {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.background-analyst-readiness.analyst-ready {
  border-left: 5px solid #1f9d7a;
}
.background-analyst-readiness.identity-only {
  border-left: 5px solid #f8a61b;
}
.background-analyst-readiness.not-researchable {
  border-left: 5px solid #9aa6b2;
}
.background-analyst-readiness h3 {
  margin: 3px 0 6px;
  color: var(--navy);
  font-size: 20px;
}
.background-analyst-readiness p {
  margin: 0;
  color: #42546a;
  font-size: 14px;
  line-height: 1.5;
}
.background-readiness-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.background-readiness-checks span {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px 10px;
  color: #42546a;
  font-size: 12px;
  font-weight: 900;
}
.background-readiness-checks .passed {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}
.background-readiness-checks .missing {
  border-color: #f0cf91;
  background: #fff8e8;
  color: #7a4c00;
}
.background-fact-table {
  display: grid;
  gap: 7px;
}
.background-fact-row {
  display: grid;
  grid-template-columns: minmax(130px, .75fr) minmax(160px, 1fr) minmax(220px, 1.2fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e1ebf3;
  border-radius: 8px;
  background: #fbfdff;
  padding: 9px 10px;
}
.background-fact-row.source-backed {
  border-left: 4px solid #1f9d7a;
}
.background-fact-row.needs-source,
.background-fact-row.missing {
  border-left: 4px solid #f8a61b;
}
.background-fact-row.withheld {
  border-left: 4px solid #9aa6b2;
}
.background-fact-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.background-fact-row strong {
  color: var(--navy);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.background-fact-row em {
  color: #526477;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.background-evidence-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.background-evidence-lane {
  display: grid;
  gap: 8px;
  border: 1px solid #e1ebf3;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}
.background-evidence-lane.source-backed {
  border-left: 4px solid #1f9d7a;
}
.background-evidence-lane.missing {
  border-left: 4px solid #f8a61b;
}
.background-evidence-lane > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.background-evidence-lane strong {
  color: var(--navy);
  font-size: 13px;
}
.background-evidence-lane span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.background-evidence-lane p,
.background-deep-gaps-card p,
.background-dossier-grid p {
  margin: 0;
  color: #526477;
  font-size: 13px;
  line-height: 1.45;
}
.background-evidence-lane ul {
  margin: 0;
  padding-left: 18px;
}
.background-evidence-lane li {
  color: #42546a;
  font-size: 12px;
}
.background-deep-gaps-card {
  border-left: 5px solid #f8a61b;
}
.background-deep-gaps-card p {
  margin-top: 10px;
  color: #7a4c00;
  font-weight: 800;
}
.background-dossier-card {
  border-left: 5px solid #1f9d7a;
}
.background-dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.background-dossier-grid article {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.background-dossier-grid strong {
  color: var(--navy);
  font-size: 13px;
}
.background-dossier-grid span {
  color: #14644d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.background-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 14px;
}
.outreach-brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 14px;
}
.outreach-decision-card {
  border-left: 4px solid var(--orange);
}
.outreach-decision-card p {
  margin: 0;
  color: #42546a;
  font-size: 14px;
  line-height: 1.5;
}
.outreach-link-list {
  display: grid;
  gap: 8px;
}
.outreach-link-list a {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.outreach-link-list a:hover,
.outreach-link-list a:focus-visible {
  border-color: var(--orange);
  background: #fffaf0;
}
.outreach-link-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-link-list strong {
  color: var(--navy);
  font-size: 13px;
}
.outreach-evidence-compact .background-evidence p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.background-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.background-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 17px;
}
.background-card p,
.background-card li {
  color: #42546a;
  line-height: 1.5;
}
.background-card ul,
.background-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}
.outreach-filter-row,
.outreach-draft-controls,
.outreach-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.outreach-filter-row select,
.outreach-draft-controls select,
.outreach-contact-form select,
.outreach-contact-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
  font: inherit;
}
.outreach-contact-form label,
.outreach-draft-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.outreach-contact-form label span,
.outreach-draft-controls label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-contact-form button,
.outreach-draft-controls button {
  align-self: end;
}
.outreach-queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.outreach-queue-summary span,
.outreach-queue-summary strong {
  border: 1px solid #dbe8f1;
  border-radius: 999px;
  background: #f8fbfd;
  padding: 4px 8px;
}
.outreach-queue-summary strong {
  color: var(--navy);
}
.outreach-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.outreach-score-grid article {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.outreach-score-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-score-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
}
.outreach-os-card {
  display: grid;
  gap: 12px;
}
.outreach-os-estimates strong {
  white-space: normal;
  line-height: 1.45;
}
.outreach-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 14px;
}
.outreach-route-list,
.outreach-draft-list {
  display: grid;
  gap: 8px;
}
.outreach-queue-heading {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-route,
.outreach-draft-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.outreach-route {
  display: grid;
  gap: 6px;
}
.outreach-route div {
  display: grid;
  gap: 2px;
}
.outreach-route span,
.outreach-draft-card span {
  color: var(--muted);
  font-size: 12px;
}
.outreach-route a,
.outreach-route > span {
  color: var(--navy);
  overflow-wrap: anywhere;
}
.outreach-draft-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.outreach-draft-card pre {
  margin: 10px 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  white-space: pre-wrap;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #26384d;
}
.outreach-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.outreach-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #dbe8f1;
  border-radius: 999px;
  background: #fff;
  padding: 2px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-status-pill.pass,
.outreach-status-pill.approved,
.outreach-status-pill.ready_to_send_demo {
  border-color: #b9e1cc;
  background: #f0fbf5;
  color: #16724d;
}
.outreach-status-pill.blocked,
.outreach-status-pill.rejected {
  border-color: #f2c3bb;
  background: #fff5f3;
  color: #b23827;
}
.outreach-status-pill.pending,
.outreach-status-pill.draft_pending,
.outreach-status-pill.not_sent {
  border-color: #f2d692;
  background: #fff9e9;
  color: #8c5f08;
}
.outreach-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-width: 0;
}

.outreach-page-toolbar .outreach-inner-tabs {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 0;
  padding: 4px;
  border-radius: 8px;
  overflow-x: auto;
  scrollbar-gutter: stable;
}
.outreach-page-toolbar .evaluation-inner-tab {
  flex: 0 0 auto;
  min-width: 112px;
  min-height: 36px;
  padding: 6px 7px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.outreach-page-toolbar .inspector-toggle {
  flex: 0 0 auto;
}
.outreach-subpanel {
  display: none;
}
.outreach-subpanel.active {
  display: block;
  height: calc(100vh - 162px);
  min-height: 0;
  overflow: hidden;
}
.outreach-subpanel[hidden] {
  display: none !important;
}
.outreach-subpanel .background-layout {
  height: calc(100vh - 168px);
}
.outreach-radar-root {
  min-height: 0;
}
.outreach-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.outreach-breadcrumb button {
  border: 1px solid #cfe1ee;
  border-radius: 999px;
  background: #fff;
  color: #2f80aa;
  padding: 5px 9px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.outreach-breadcrumb span,
.outreach-breadcrumb strong,
.outreach-breadcrumb em {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outreach-breadcrumb span::before,
.outreach-breadcrumb strong::before,
.outreach-breadcrumb em::before {
  content: "/";
  margin-right: 8px;
  color: #b7c9d7;
}
.outreach-breadcrumb strong {
  color: var(--navy);
}
.outreach-breadcrumb em {
  font-style: normal;
}
.market-command {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 16px;
}
.market-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr);
  gap: 16px;
  align-items: start;
}
.market-command h3 {
  margin: 2px 0 6px;
  color: var(--navy);
  font-size: 23px;
  letter-spacing: 0;
}
.market-command p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.market-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.market-kpi-strip article {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.market-kpi-strip span,
.market-board-title,
.market-segment-board > strong,
.market-brief-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-kpi-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}
.market-command-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.35fr) minmax(290px, .65fr);
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}
.market-map-panel,
.market-rank-board,
.market-brief-card {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
}
.market-map-stage {
  position: relative;
  min-height: 360px;
  aspect-ratio: 1000 / 520;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.market-world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: .96;
  user-select: none;
  pointer-events: none;
}
.market-map-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  transform: translate(-14px, -50%);
  max-width: 148px;
  border: 1px solid #b8d4e7;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(29, 73, 102, .12);
}
.market-map-marker span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffcc5c;
  color: #102f49;
  font-size: 11px;
  font-weight: 900;
}
.market-map-marker strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.market-map-marker.active,
.market-rank-row.active {
  border-color: #2f80aa;
  background: #eef7fc;
  box-shadow: 0 0 0 2px rgba(47, 128, 170, .12);
}
.market-map-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.market-map-caption strong {
  color: var(--navy);
}
.market-rank-board,
.market-segment-board {
  display: grid;
  align-content: start;
  gap: 8px;
}
.market-board-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.market-board-title .text-btn {
  min-height: 28px;
}
.market-board-title .text-btn.active {
  border-color: #8eb9d7;
  background: #eef6fc;
  color: var(--navy);
}
.market-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 52px;
  gap: 9px;
  align-items: center;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}
.rank-no {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eef6fc;
  color: #2f80aa;
  font-weight: 900;
}
.rank-market {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rank-market strong,
.rank-market small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-market strong {
  color: var(--navy);
}
.rank-market small {
  color: var(--muted);
}
.rank-score {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  color: var(--navy);
  font-weight: 900;
  background: conic-gradient(#ffcc5c var(--score), #e6f0f7 0);
}
.market-decision-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #2f80aa;
  border-radius: 8px;
  background: #fbfdff;
}
.market-decision-board.enter {
  border-left-color: #19a15f;
}
.market-decision-board.validate {
  border-left-color: #f2b63f;
}
.market-decision-board.hold {
  border-left-color: #b85c5c;
}
.market-decision-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.market-decision-summary article,
.market-decision-card {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.market-decision-summary span,
.market-decision-card > span,
.signal-detail-section > span,
.signal-detail-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-decision-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.market-decision-summary p,
.market-decision-card li,
.signal-detail p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.market-operating-row {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
}
.market-scenario-panel,
.market-readiness-panel {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.market-scenario-panel > div:first-child,
.market-readiness-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.market-scenario-panel span,
.market-readiness-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-scenario-panel strong,
.market-readiness-panel strong {
  color: var(--navy);
  line-height: 1.3;
}
.market-scenario-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.market-scenario-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-scenario-ops span {
  border: 1px solid #dbe8f1;
  border-radius: 999px;
  background: #f8fbfd;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  text-transform: none;
}
.market-scenario-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.market-scenario-buttons button {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 7px;
}
.market-scenario-buttons button.active,
.market-scenario-buttons button:hover,
.market-scenario-buttons button:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.market-readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 7px;
}
.market-readiness-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #e4eef5;
  border-left: 4px solid #b9cfe0;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.market-readiness-grid > div.pass {
  border-left-color: #19a15f;
  background: #f4fbf7;
}
.market-readiness-grid > div.watch {
  border-left-color: #f2b63f;
  background: #fffaf0;
}
.market-readiness-grid > div.gap {
  border-left-color: #b85c5c;
  background: #fff7f7;
}
.market-readiness-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.market-live-feed {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.market-live-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.market-live-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.market-live-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-live-head strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}
.market-live-head small {
  color: var(--muted);
  font-size: 12px;
}
.market-live-head button {
  flex: 0 0 auto;
  border: 1px solid #b8d4e7;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}
.market-live-head button:hover,
.market-live-head button:focus-visible {
  background: #eef6fc;
}
.market-scan-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  max-width: 620px;
}
.market-scan-control input {
  flex: 1 1 260px;
  min-width: 0;
  border: 1px solid #cfe0ec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  padding: 9px 11px;
}
.market-scan-control button {
  border: 1px solid #b8d4e7;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 900;
  padding: 9px 12px;
}
.market-scan-control button:hover,
.market-scan-control button:focus-visible,
.market-scan-control input:focus {
  border-color: #8fc7df;
  box-shadow: 0 0 0 3px rgba(81, 185, 220, 0.16);
  outline: none;
}
.market-agent-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-agent-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbe8f1;
  border-radius: 999px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
}
.market-agent-strip span.done,
.market-agent-strip span.running {
  border-color: #b9dec9;
  background: #f4fbf7;
  color: #16724d;
}
.market-agent-strip strong {
  color: inherit;
}
.market-live-signal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.market-live-signal-list a,
.market-live-empty {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #e4eef5;
  border-left: 4px solid #b9cfe0;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 9px;
  text-decoration: none;
}
.market-live-signal-list a.hot {
  border-left-color: #e49a22;
  background: #fffaf0;
}
.market-live-signal-list a.warm {
  border-left-color: #19a15f;
  background: #f4fbf7;
}
.market-live-signal-list a span,
.market-live-signal-list a small,
.market-live-signal-list a em,
.market-live-empty small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.market-live-signal-list a strong,
.market-live-empty strong {
  color: var(--navy);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.market-live-signal-list a em {
  color: #16724d;
  font-style: normal;
  font-weight: 900;
}
.market-opportunity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.market-opportunity-card {
  display: grid;
  gap: 7px;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #8fb7d1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.market-opportunity-card.high {
  border-left-color: #16a66f;
  background: #f3fbf6;
}
.market-opportunity-card.medium {
  border-left-color: #f2b73f;
  background: #fffaf0;
}
.market-opportunity-card > span,
.market-intel-detail-grid > section > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-opportunity-card strong {
  color: var(--navy);
  font-size: 18px;
}
.market-opportunity-card p,
.market-opportunity-card small {
  color: var(--muted);
  line-height: 1.35;
}
.market-opportunity-card div,
.market-target-grid,
.market-article-list {
  display: grid;
  gap: 6px;
}
.market-opportunity-card a,
.market-target-grid a,
.market-article-list a {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #e3edf5;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--navy);
  padding: 7px 8px;
  text-decoration: none;
}
.market-opportunity-card a:hover,
.market-opportunity-card a:focus-visible,
.market-target-grid a:hover,
.market-target-grid a:focus-visible,
.market-article-list a:hover,
.market-article-list a:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.market-intel-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1.25fr);
  gap: 10px;
}
.market-intel-detail-grid > section {
  display: grid;
  gap: 8px;
}
.market-target-grid a strong,
.market-article-list a strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.market-target-grid a small,
.market-target-grid a em,
.market-article-list a small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}
.market-decision-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) repeat(2, minmax(210px, 1fr));
  gap: 10px;
  align-items: start;
}
.market-decision-card {
  display: grid;
  gap: 8px;
}
.market-decision-card.wide {
  grid-row: span 2;
}
.market-decision-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}
.market-action-table,
.market-comparison-table {
  display: grid;
  gap: 7px;
}
.market-action-table {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.market-action-table button {
  display: grid;
  gap: 3px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}
.market-action-table button:hover,
.market-action-table button:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.market-action-table button.has-live-signal {
  border-color: #a8dcc0;
  background: linear-gradient(90deg, #f3fbf6, #fff);
}
.market-action-table strong,
.market-action-table small,
.market-action-table em,
.market-comparison-table strong,
.market-comparison-table small,
.market-comparison-table em {
  min-width: 0;
  overflow-wrap: anywhere;
}
.market-action-table strong,
.market-comparison-table strong {
  color: var(--navy);
}
.market-action-table small,
.market-comparison-table small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.market-action-table em,
.market-comparison-table em {
  color: #16724d;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.market-comparison-table > div {
  display: grid;
  gap: 3px;
  border: 1px solid #e4eef5;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.market-comparison-table > div.active {
  border-color: #9dd8b8;
  background: #f3fbf6;
}
.market-upgrade-list {
  display: grid;
  gap: 7px;
}
.market-upgrade-list > div {
  display: grid;
  gap: 5px;
  border: 1px solid #e4eef5;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.market-upgrade-list strong {
  color: var(--navy);
}
.market-upgrade-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.market-upgrade-list button {
  justify-self: start;
  border: 1px solid #b8d4e7;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 8px;
}
.market-upgrade-list button:hover,
.market-upgrade-list button:focus-visible {
  background: #eef6fc;
}
.market-upgrade-list a {
  justify-self: start;
  color: #0969a8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.market-upgrade-list a:hover,
.market-upgrade-list a:focus-visible {
  text-decoration: underline;
}
.market-intel-grid,
.market-assumption-table,
.market-feedback-loop,
.market-schema-list,
.market-bootstrap-table,
.market-source-queue,
.market-proxy-table,
.market-stop-go {
  display: grid;
  gap: 7px;
}
.market-intel-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.market-intel-grid > div,
.market-assumption-table > div,
.market-feedback-loop > div,
.market-schema-list > div,
.market-bootstrap-table > div,
.market-source-queue > div,
.market-proxy-table > div,
.market-stop-go > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #e4eef5;
  border-left: 4px solid #b9cfe0;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.market-intel-grid > div.pass {
  border-left-color: #19a15f;
  background: #f4fbf7;
}
.market-intel-grid > div.watch {
  border-left-color: #f2b63f;
  background: #fffaf0;
}
.market-intel-grid > div.gap {
  border-left-color: #b85c5c;
  background: #fff7f7;
}
.market-schema-list > div.pass,
.market-stop-go > div.pass {
  border-left-color: #19a15f;
  background: #f4fbf7;
}
.market-schema-list > div.watch,
.market-stop-go > div.watch {
  border-left-color: #f2b63f;
  background: #fffaf0;
}
.market-schema-list > div.gap,
.market-stop-go > div.gap {
  border-left-color: #b85c5c;
  background: #fff7f7;
}
.market-intel-grid span,
.market-assumption-table span,
.market-proxy-table span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-intel-grid strong,
.market-assumption-table strong,
.market-feedback-loop strong,
.market-schema-list strong,
.market-bootstrap-table strong,
.market-source-queue strong,
.market-proxy-table strong,
.market-stop-go strong {
  color: var(--navy);
  line-height: 1.3;
}
.market-intel-grid small,
.market-assumption-table small,
.market-feedback-loop small,
.market-feedback-loop span,
.market-schema-list small,
.market-schema-list span,
.market-bootstrap-table small,
.market-bootstrap-table span,
.market-source-queue small,
.market-proxy-table small,
.market-stop-go small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.market-source-queue a {
  color: #0f5f8f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.market-source-queue a:hover,
.market-source-queue a:focus-visible {
  text-decoration: underline;
}
.market-bootstrap-table button {
  justify-self: start;
  border: 1px solid #b8d4e7;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 8px;
}
.market-bootstrap-table button:hover,
.market-bootstrap-table button:focus-visible {
  background: #eef6fc;
}
.market-feedback-loop em,
.market-schema-list em,
.market-stop-go em {
  color: #16724d;
  font-style: normal;
  font-weight: 900;
}
.market-drilldown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.market-brief-card {
  display: grid;
  align-content: start;
  gap: 10px;
}
.market-score-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.market-open-workbench {
  justify-self: start;
}
.market-brief-card > strong {
  color: var(--navy);
  font-size: 16px;
}
.market-brief-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.market-brief-metrics div {
  border: 1px solid #e4eef5;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.market-brief-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.market-brief-metrics strong {
  display: block;
  color: var(--navy);
  font-size: 17px;
}
.market-account-list,
.market-signal-grid {
  display: grid;
  gap: 8px;
}
.market-account-list.scrollable {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.market-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}
.market-account-row:hover {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.market-account-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.market-account-row strong,
.market-account-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-account-row strong {
  color: var(--navy);
}
.market-account-row small {
  color: var(--muted);
}
.market-account-row em {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: #f4fbf7;
  color: #16724d;
  font-style: normal;
  font-weight: 900;
}
.market-signal-pill {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.market-signal-pill.evidence {
  border-color: #cfe8d9;
  background: #f4fbf7;
}
.market-signal-pill.evidence a {
  color: #16724d;
  text-decoration: none;
}
.market-signal-pill strong,
.market-signal-pill small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-signal-pill strong {
  color: var(--navy);
  font-size: 13px;
}
.market-signal-pill small {
  color: var(--muted);
  font-size: 12px;
}
.market-signal-refresh {
  justify-self: start;
  min-height: 30px;
  margin-top: 2px;
}
.signal-command {
  display: grid;
  gap: 10px;
}
.signal-command .signal-lane-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 0;
}
.signal-lane-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}
.signal-lane-btn:hover,
.signal-lane-btn:focus-visible,
.signal-lane-btn.active {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.signal-lane-btn span {
  min-width: 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signal-lane-btn strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.signal-detail {
  display: grid;
  gap: 9px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.signal-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.signal-detail-head strong {
  color: var(--navy);
  line-height: 1.3;
}
.signal-detail-section {
  display: grid;
  gap: 6px;
}
.signal-detail-section a,
.signal-detail-section button,
.signal-detail-section small {
  min-width: 0;
  border: 1px solid #e4eef5;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--navy);
  padding: 7px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.signal-detail-section button {
  cursor: pointer;
}
.signal-detail-section a:hover,
.signal-detail-section button:hover {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.outreach-active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #cfe8d9;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 8px;
}
.outreach-active-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-active-filter button {
  border: 1px solid #a9dac0;
  border-radius: 999px;
  background: #fff;
  color: #16724d;
  font-weight: 900;
  padding: 5px 9px;
  cursor: pointer;
}
.outreach-admin-tools {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.outreach-admin-tools summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style-position: inside;
}
.outreach-admin-tools[open] {
  display: grid;
  gap: 8px;
}
.outreach-admin-tools[open] summary {
  margin-bottom: 2px;
}
.outreach-intel-root {
  height: 100%;
  min-height: 0;
  overflow: auto;
}
.outreach-intel-dashboard,
.outreach-intel-split {
  min-height: 0;
}
.outreach-intel-dashboard {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.outreach-intel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.outreach-intel-heading h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.1;
}
.outreach-intel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.outreach-intel-stat strong {
  font-size: 20px;
}
.outreach-intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.outreach-intel-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.outreach-intel-grid section,
.outreach-intel-detail,
.outreach-intel-main {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
}
.outreach-intel-grid section {
  padding: 12px;
}
.outreach-intel-grid h3,
.outreach-intel-detail h4 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 14px;
}
.outreach-intel-count-list {
  display: grid;
  gap: 7px;
}
.outreach-intel-count-list.compact {
  max-height: 360px;
  overflow: auto;
}
.outreach-intel-count-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border: 1px solid #e3edf5;
  border-radius: 7px;
  background: #f8fbfd;
  padding: 6px 8px;
  overflow: hidden;
}
.outreach-intel-count-row span,
.outreach-intel-count-row strong {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.outreach-intel-count-row span {
  color: #2f465d;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outreach-intel-count-row strong {
  color: var(--navy);
  font-size: 12px;
}
.outreach-intel-count-row i {
  position: absolute;
  inset: auto auto 0 0;
  height: 3px;
  background: #79b8d8;
}
.outreach-intel-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 12px;
  height: 100%;
  padding: 12px;
  overflow: hidden;
}
.outreach-intel-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}
.outreach-intel-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr)) auto auto;
  gap: 8px;
  min-width: 0;
}
.outreach-intel-filterbar input,
.outreach-intel-filterbar select {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
}
.outreach-intel-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.outreach-intel-result-meta strong {
  color: var(--navy);
  font-size: 18px;
}
.outreach-intel-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid #e0eaf2;
  border-radius: 8px;
}
.outreach-intel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.outreach-intel-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f7fb;
  color: #39536c;
  padding: 9px;
  text-align: left;
  white-space: nowrap;
}
.outreach-intel-table td {
  border-top: 1px solid #e6eef5;
  padding: 9px;
  vertical-align: top;
}
.outreach-intel-table tr.active td,
.outreach-intel-table tr:hover td {
  background: #eef6fc;
}
.outreach-intel-table strong,
.outreach-intel-table small {
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outreach-intel-table small {
  margin-top: 3px;
  color: var(--muted);
}
.outreach-intel-link {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #0f4e78;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outreach-intel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.outreach-intel-pills span {
  border: 1px solid #d8e7f1;
  border-radius: 999px;
  background: #f8fbfd;
  color: #38546c;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}
.outreach-intel-detail {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 13px;
  overflow: auto;
}
.outreach-intel-detail-head h3 {
  margin: 3px 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.outreach-intel-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.outreach-intel-detail section {
  border-top: 1px solid #e4eef5;
  padding-top: 10px;
}
.outreach-intel-detail p,
.outreach-intel-detail dd {
  color: #334b62;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.outreach-intel-detail dl {
  display: grid;
  gap: 7px;
  margin: 0;
}
.outreach-intel-detail dl div {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 8px;
}
.outreach-intel-detail dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-intel-detail dd {
  margin: 0;
}
.outreach-intel-source-list {
  display: grid;
  gap: 6px;
}
.outreach-intel-source-list a {
  border: 1px solid #dbe8f1;
  border-radius: 7px;
  background: #f8fbfd;
  color: #0f4e78;
  padding: 7px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.outreach-intel-source-list a:hover,
.outreach-intel-source-list a:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.outreach-intel-detail-empty {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.outreach-records-view {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}
.outreach-records-toolbar {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  min-width: 0;
}
.outreach-records-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}
.outreach-record-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid #e0eaf2;
  border-radius: 8px;
  background: #fff;
}
.outreach-record-list > button {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #e6eef5;
  background: #fff;
  color: var(--text);
  padding: 10px 48px 10px 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.outreach-record-list > button:last-of-type {
  border-bottom: 0;
}
.outreach-record-list > button:hover,
.outreach-record-list > button:focus-visible,
.outreach-record-list > button.active {
  background: #eef6fc;
}
.outreach-record-list strong,
.outreach-record-list span,
.outreach-record-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outreach-record-list strong {
  color: #0f4e78;
  font-size: 13px;
  font-weight: 900;
}
.outreach-record-list span {
  color: #38546c;
  font-size: 12px;
  font-weight: 800;
}
.outreach-record-list small {
  color: var(--muted);
  font-size: 11px;
}
.outreach-record-list em {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 30px;
  border: 1px solid #d8e7f1;
  border-radius: 999px;
  background: #f8fbfd;
  color: var(--navy);
  padding: 2px 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.outreach-record-list-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e0eaf2;
  background: rgba(248, 251, 253, 0.96);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.outreach-record-list-footer .text-btn {
  min-height: 28px;
  padding: 5px 10px;
  white-space: nowrap;
}
.outreach-record-loadbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.outreach-record-loadbar .text-btn {
  min-height: 28px;
  padding: 5px 10px;
  white-space: nowrap;
}
.outreach-record-detail {
  min-width: 0;
  overflow: auto;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.outreach-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.outreach-record-head h3 {
  margin: 3px 0 4px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.outreach-record-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}
.outreach-record-open {
  flex: 0 0 auto;
}
.outreach-record-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.outreach-record-kpis article {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.outreach-record-kpis span,
.outreach-record-detail h4,
.outreach-record-fields dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.outreach-record-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.outreach-record-loading {
  margin: 0 0 10px;
}
.outreach-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}
.outreach-record-grid article {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
}
.outreach-record-grid article.wide {
  grid-column: 1 / -1;
}
.outreach-record-detail h4 {
  margin: 0 0 9px;
  color: #39536c;
}
.outreach-record-fields {
  display: grid;
  gap: 8px;
  margin: 0;
}
.outreach-record-fields div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 9px;
}
.outreach-record-fields dd {
  margin: 0;
  color: #334b62;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.outreach-record-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.outreach-record-chips span {
  border: 1px solid #d8e7f1;
  border-radius: 999px;
  background: #fff;
  color: #38546c;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.outreach-record-links {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.outreach-record-links a {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 7px;
  background: #fff;
  color: #0f4e78;
  padding: 7px;
  text-decoration: none;
}
.outreach-record-links a:hover,
.outreach-record-links a:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}
.outreach-record-links span,
.outreach-record-links small {
  display: block;
  overflow-wrap: anywhere;
}
.outreach-record-links span {
  font-size: 12px;
  font-weight: 900;
}
.outreach-record-links small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.market-segment-board {
  border-top: 1px solid #e4eef5;
  padding-top: 8px;
}
.market-segment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 32px;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
}
.market-segment-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-segment-row div {
  height: 8px;
  border-radius: 999px;
  background: #e6f0f7;
  overflow: hidden;
}
.market-segment-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #61c6e8, #9bd8b5, #ffcc5c);
}
.abm-system {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
}
.abm-system-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.abm-system-head h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 19px;
}
.abm-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.abm-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.abm-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}
.abm-card.wide {
  grid-column: 1 / -1;
}
.abm-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.abm-card > strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 16px;
}
.abm-card.priority {
  border-left: 4px solid #2f80aa;
}
.committee-role-list,
.feedback-history {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.committee-target-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.committee-target,
.committee-gap-note {
  display: grid;
  gap: 3px;
  border: 1px solid #cfe8d9;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 8px;
}
.committee-gap-note {
  border-color: #f2d692;
  background: #fff9e9;
}
.committee-target strong,
.committee-gap-note strong {
  color: var(--navy);
  font-size: 13px;
}
.committee-target span,
.committee-target small,
.committee-gap-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.committee-role-list li,
.feedback-history li {
  display: grid;
  gap: 3px;
  border: 1px solid #e4eef5;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
}
.committee-role-list span,
.committee-role-list small,
.committee-role-list em,
.feedback-history span,
.feedback-history small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}
.committee-role-list em {
  overflow-wrap: anywhere;
}
.signal-lane-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.signal-lane,
.signal-result {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 9px;
}
.signal-lane strong,
.signal-result strong {
  color: var(--navy);
  font-size: 13px;
}
.signal-result a {
  color: var(--blue);
}
.signal-lane small,
.signal-result span,
.signal-result p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.signal-lane.source-backed {
  border-color: #b9e1cc;
  background: #f0fbf5;
}
.signal-lane.monitor-next {
  border-color: #f2d692;
  background: #fff9e9;
}
.feedback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 8px;
  margin-top: 10px;
}
.feedback-form select,
.feedback-form input,
.feedback-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  font: inherit;
}
.feedback-form textarea,
.feedback-form button {
  grid-column: 1 / -1;
}
.background-mini-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
}
.background-mini-grid span {
  color: var(--muted);
}
.background-mini-grid strong {
  color: var(--text);
  overflow-wrap: anywhere;
}
.background-warning {
  border: 1px solid #f2c46a;
  border-radius: 8px;
  background: #fff8e8;
  color: #6d4a08;
  padding: 12px;
}
.background-latest-shell {
  display: grid;
  gap: 12px;
}
.background-latest-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: stretch;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}
.background-latest-hero h3 {
  margin: 2px 0 6px;
  color: var(--navy);
  font-size: 24px;
}
.background-latest-hero p {
  margin: 0;
  color: #52657a;
  line-height: 1.45;
}
.background-latest-hero aside {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  border: 1px solid #dbe7f0;
  border-radius: 8px;
  background: #f7fbfd;
  padding: 12px;
}
.background-latest-hero aside strong {
  color: #0b4b7c;
  font-size: 28px;
}
.background-latest-hero aside span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.background-latest-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.background-latest-summary span {
  border: 1px solid #d8e4ee;
  border-radius: 999px;
  background: #f8fbfd;
  color: #29445f;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}
.background-latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.background-latest-card {
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.background-latest-card h4 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 14px;
}
.background-latest-fields {
  display: grid;
  gap: 8px;
}
.background-latest-fields div {
  display: grid;
  grid-template-columns: minmax(110px, .36fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid #eef3f7;
  padding-top: 8px;
}
.background-latest-fields div:first-child {
  border-top: 0;
  padding-top: 0;
}
.background-latest-fields span {
  color: var(--muted);
  font-size: 12px;
}
.background-latest-fields strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
}
.background-latest-evidence {
  display: grid;
  gap: 8px;
}
.background-latest-evidence a,
.background-latest-evidence div {
  display: grid;
  gap: 3px;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #f8fbfd;
  padding: 8px;
  text-decoration: none;
}
.background-latest-evidence strong {
  color: var(--navy);
  font-size: 13px;
}
.background-latest-evidence span {
  color: var(--muted);
  font-size: 12px;
}
.background-list-note {
  margin: 10px 2px 0;
  color: #6b7890;
  font-size: 12px;
  line-height: 1.45;
}
.background-list-loading {
  border: 1px dashed #c7d8eb;
  border-radius: 8px;
  background: #f8fbfd;
  color: #6b7890;
  padding: 11px;
  font-size: 12px;
  font-weight: 800;
}
.background-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.background-page-arrow {
  width: 30px;
  min-width: 30px;
  padding: 5px 0;
  text-align: center;
}
.background-page-input {
  width: 54px;
  border: 1px solid #d8e4ee;
  border-radius: 6px;
  padding: 5px 7px;
  color: #0b2545;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.background-page-total {
  color: #7a8798;
  font-weight: 800;
}
.background-analytics {
  display: grid;
  gap: 14px;
}
.background-analytics[hidden] {
  display: none;
}
.background-analytics-hero {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(360px, 1.5fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}
.background-analytics-hero h3 {
  margin: 4px 0 8px;
  font-size: 22px;
  color: #0b2545;
}
.background-analytics-hero p {
  margin: 0;
  color: #526174;
  line-height: 1.5;
}
.background-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.background-analytics-kpis article {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}
.background-analytics-kpis span,
.background-analytics-kpis em {
  display: block;
  color: #6b7890;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}
.background-analytics-kpis strong {
  display: block;
  margin: 4px 0 2px;
  color: #0b2545;
  font-size: 20px;
  line-height: 1.1;
}
.background-research-backlog {
  display: grid;
  gap: 12px;
}
.background-backlog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.background-backlog-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}
.background-backlog-grid span,
.background-backlog-fields strong {
  color: #5c6f8c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.background-backlog-grid strong {
  color: var(--navy);
  font-size: 18px;
}
.background-backlog-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.background-backlog-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.background-backlog-fields span,
.background-backlog-fields em {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.background-backlog-fields b {
  color: var(--navy);
}
.background-researchability-card {
  display: grid;
  gap: 12px;
}
.background-researchability-funnel {
  display: grid;
  gap: 7px;
}
.background-researchability-funnel article {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.background-researchability-funnel article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.background-researchability-funnel strong,
.background-researchability-funnel span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.background-researchability-funnel strong {
  color: var(--navy);
}
.background-researchability-funnel span {
  color: #526174;
  font-weight: 800;
}
.background-researchability-funnel i {
  display: block;
  min-width: 4px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f80aa, #1f9d7a);
}
.background-researchability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.background-researchability-grid article {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  min-width: 0;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}
.background-researchability-grid article > strong {
  flex-basis: 100%;
  color: var(--navy);
}
.background-researchability-grid span,
.background-researchability-grid em {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.background-researchability-grid b {
  color: var(--navy);
}
.background-analytics-grid {
  align-items: start;
}
.background-analytics-card {
  min-width: 0;
}
.background-country-readiness-table {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.background-country-readiness-table > div {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(56px, .5fr) minmax(92px, .8fr) minmax(58px, .5fr) minmax(70px, .65fr) minmax(160px, 1.35fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #dfe8f4;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
  color: #475467;
  font-size: 12px;
}
.background-country-readiness-table > div.header {
  border-color: #cfdcec;
  background: #f5f8fc;
  color: #5c6f8c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.background-country-readiness-table strong,
.background-country-readiness-table span,
.background-country-readiness-table em {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.background-country-readiness-table strong {
  color: var(--navy);
}
.background-country-readiness-table em {
  color: #7a4c00;
  font-style: normal;
}
.background-analytics-bars {
  display: grid;
  gap: 8px;
}
.background-analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.6fr) minmax(48px, auto) minmax(42px, auto);
  gap: 8px;
  align-items: center;
  color: #475467;
  font-size: 12px;
}
.background-analytics-bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.background-analytics-bar-row strong,
.background-analytics-bar-row em {
  color: #102a43;
  font-style: normal;
  text-align: right;
}
.background-analytics-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}
.background-analytics-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2e7bb4;
}
.background-gap-list {
  display: grid;
  gap: 8px;
}
.background-gap-item {
  display: grid;
  grid-template-columns: minmax(160px, .9fr) minmax(90px, auto) minmax(220px, 1.4fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e6edf3;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}
.background-gap-item strong,
.background-gap-item span {
  color: #102a43;
}
.background-gap-item p {
  margin: 0;
}
.background-iteration p {
  margin: 6px 0 0;
  color: #526477;
  font-size: 13px;
}
.background-iteration ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #42546a;
}
.background-evidence-list {
  display: grid;
  gap: 8px;
}
.background-evidence {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.background-evidence.rejected {
  border-color: #efc9c9;
  background: #fff8f8;
}
.background-evidence a {
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}
.background-evidence p {
  margin: 6px 0 0;
  color: #526477;
  font-size: 13px;
  line-height: 1.45;
}
.background-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.background-source-meta span {
  border: 1px solid #c8d8e6;
  border-radius: 999px;
  background: #fff;
  color: #40566f;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
}
.background-evidence .background-source-reason {
  color: #6b7b8f;
  font-size: 12px;
}
.background-source-import form {
  display: grid;
  gap: 8px;
}
.background-source-import input,
.background-source-import textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  font: inherit;
}
.background-source-import textarea {
  resize: vertical;
}
.background-source-correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.background-source-correction-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.background-source-correction-toggle input {
  width: auto;
  margin: 0;
  padding: 0;
}
.background-source-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.background-source-import-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .background-source-correction-grid {
    grid-template-columns: 1fr;
  }
  .background-source-import-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
.background-compact-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.background-compact-card {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.background-compact-card h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 15px;
}
.background-compact-card p {
  margin: 0;
  color: #42546a;
  line-height: 1.45;
  font-size: 13px;
}
.background-compact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.background-compact-metrics span {
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.background-compact-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 16px;
}
.background-compact-gap-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.background-compact-gap-strip strong {
  flex-basis: 100%;
  color: var(--navy);
  font-size: 12px;
}
.background-compact-gap-strip span {
  max-width: 100%;
  border: 1px solid #f0d49b;
  border-radius: 999px;
  background: #fff8e8;
  padding: 5px 8px;
  color: #7a5814;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.background-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.profile-seed-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  padding: 4px;
  border: 1px solid #d9e6ef;
  border-radius: 8px;
  background: #f5f8fb;
}
.seed-test-btn {
  min-height: 34px;
  max-width: none;
  padding: 7px 8px;
  border-color: transparent;
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.ai-seed-btn {
  color: #133f5f;
  background: #eaf4fb;
}
.seed-test-btn:hover,
.seed-test-btn:focus-visible,
.ai-seed-btn:hover,
.ai-seed-btn:focus-visible {
  border-color: var(--orange);
  background: #fffaf0;
}
.profile-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.profile-section:first-child {
  margin-top: 0;
}
.profile-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}
.profile-intelligence-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.profile-background-embedded {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.profile-background-embedded .background-analyst-shell {
  margin-top: 0;
}
.profile-state-kpis {
  margin: 0;
}
.profile-report-grid {
  align-items: start;
}
.profile-intelligence-card {
  min-width: 0;
}
.profile-intelligence-card .mini-label {
  display: block;
  margin-bottom: 6px;
}
.profile-mini-grid {
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
}
.profile-mini-grid strong {
  overflow-wrap: anywhere;
}
.profile-background-empty p {
  margin: 0;
}
.profile-legacy-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.profile-legacy-details > summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.profile-legacy-details .profile-section {
  margin-top: 14px;
}
.profile-cost-panel {
  margin-top: 16px;
}
.profile-background-layout .profile-fields-panel {
  min-width: 0;
}
.profile-technical-payload {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}
.profile-technical-payload > summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.cost-analysis-card {
  gap: 10px;
  min-width: 0;
  container-type: inline-size;
}
.quote-workflow-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-width: 0;
  container-type: inline-size;
}
.quote-workflow-card:first-child {
  margin-top: 0;
}
.chat-cost-panel .quote-workflow-card {
  padding: 10px;
}
.quote-workflow-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}
.section-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}
.quote-workflow-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.quote-workflow-head p,
.quote-group p,
.quote-adjustment-list p,
.quote-event-list p,
.quote-conflicts p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.quote-status {
  border-radius: 999px;
  background: #eef6fc;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
  text-transform: uppercase;
}
.quote-status.ready {
  background: #e5f7eb;
  color: #14723c;
}
.quote-status.partial {
  background: #fff5da;
  color: #875300;
}
.quote-accepted-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.quote-accepted-grid div,
.quote-formula,
.quote-group,
.quote-adjustment-list article,
.quote-conflicts article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
  min-width: 0;
}
.quote-metric {
  display: grid;
  align-content: start;
  gap: 4px;
}
.quote-accepted-grid span,
.quote-formula span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.quote-accepted-grid strong,
.quote-formula strong {
  display: block;
  color: var(--navy);
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}
.quote-metric em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}
.quote-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.quote-section-head h3 {
  margin: 0;
}
.quote-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.quote-conflicts article {
  border-color: #f2c0a8;
  background: #fff8f3;
}
.quote-conflicts article span {
  display: block;
  margin-top: 4px;
  color: #8a3b16;
  font-size: 12px;
  font-weight: 800;
}
.quote-group-list,
.quote-adjustment-list,
.quote-event-list,
.quote-component-list,
.quote-conflicts {
  display: grid;
  gap: 8px;
}
.quote-line-table,
.cost-line-table {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.quote-line-header,
.cost-line-header,
.quote-line-main,
.cost-line-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(90px, .45fr) minmax(120px, .55fr) minmax(120px, .55fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}
.quote-line-header,
.cost-line-header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
  text-transform: uppercase;
}
.quote-line-row,
.cost-line {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.quote-line-main strong,
.cost-line-main strong {
  color: var(--navy);
}
.quote-line-main strong,
.quote-line-main span,
.cost-line-main strong,
.cost-line-main span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.quote-line-main span,
.cost-line-main span {
  color: #40566d;
  font-size: 13px;
  line-height: 1.35;
}
.quote-line-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.quote-line-detail,
.quote-detail-panel {
  min-width: 0;
  border: 1px solid #e3edf5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 8px 10px;
}
.quote-line-detail summary,
.quote-detail-panel summary {
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}
.quote-detail-panel {
  display: block;
}
.quote-detail-panel > strong {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.quote-detail-panel > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.quote-group-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(90px, .55fr) minmax(110px, .6fr) minmax(110px, .6fr);
  gap: 8px;
  align-items: start;
}
.quote-group-main strong,
.quote-group-main span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.quote-group-main strong {
  color: var(--navy);
}
.quote-group-main span,
.quote-component-list em,
.quote-adjustment-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.quote-component-list {
  margin-top: 8px;
}
.quote-component-list div {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(110px, .4fr);
  gap: 6px;
  border-top: 1px solid #e7eef5;
  padding-top: 7px;
}
.quote-component-list span,
.quote-component-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.quote-component-list em {
  grid-column: 1 / -1;
  font-style: normal;
}
@container (max-width: 560px) {
  .quote-workflow-card {
    padding: 10px;
  }
  .quote-workflow-head {
    align-items: flex-start;
  }
  .quote-accepted-grid {
    grid-template-columns: 1fr;
  }
  .quote-group-main {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .quote-component-list div {
    grid-template-columns: 1fr;
  }
  .quote-component-list strong {
    font-size: 13px;
  }
  .quote-line-header,
  .cost-line-header {
    display: none;
  }
  .quote-line-main,
  .cost-line-main {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.quote-adjustment-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.quote-adjustment-list p {
  grid-column: 1 / -1;
}
.quote-event-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  border-left: 3px solid #b9cfe0;
  padding-left: 8px;
}
.quote-event-list article.accepted {
  border-left-color: #19a55b;
}
.quote-event-list article.revision {
  border-left-color: var(--orange);
}
.quote-event-list article span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef6fc;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}
.cost-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.invoice-item-preview-list {
  display: grid;
  gap: 8px;
}
.invoice-item-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(70px, .6fr) minmax(110px, .7fr) minmax(110px, .7fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.invoice-item-preview strong,
.invoice-item-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.invoice-item-preview span {
  color: var(--muted);
  font-size: 12px;
}
.cost-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.cost-summary-grid {
  margin-top: 2px;
}
.cost-summary span,
.cost-total-formula,
.cost-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px;
}
.cost-total-formula {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cost-total-formula span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.cost-total-formula strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}
.formula-detail {
  min-width: 0;
}
.formula-detail summary {
  width: fit-content;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.formula-detail pre {
  max-width: 100%;
  margin: 6px 0 0;
  padding: 8px;
  border: 1px solid #d8e5ef;
  border-radius: 6px;
  background: #fff;
  color: #244259;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cost-line-list {
  display: grid;
  gap: 8px;
}
.cost-checklist,
.cost-recommendation-list {
  display: grid;
  gap: 8px;
}
.cost-checkitem,
.cost-recommendation {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.cost-checkitem span {
  width: fit-content;
  border-radius: 999px;
  background: #eef6fc;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 7px;
  text-transform: uppercase;
}
.cost-checkitem.confirmed span {
  background: #e5f7eb;
  color: #14723c;
}
.cost-checkitem.recommended span {
  background: #fff5da;
  color: #875300;
}
.cost-checkitem.missing span {
  background: #f5edf8;
  color: #70427d;
}
.cost-checkitem strong,
.cost-recommendation strong {
  color: var(--navy);
  line-height: 1.35;
}
.cost-checkitem em,
.cost-recommendation p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cost-line-evidence {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.cost-line-evidence span,
.cost-line-evidence p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cost-runtime-panel .cost-total-formula {
  margin-top: 8px;
}
.cost-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cost-source-row button {
  border: 1px solid #b9cfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}
.cost-source-row span {
  color: var(--muted);
  font-size: 12px;
}
.invoice-status {
  margin-top: 14px;
}
.invoice-link-list {
  display: grid;
  gap: 6px;
}
.invoice-link-list a {
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.error-text {
  color: var(--bad);
  background: var(--bad-bg);
  border: 1px solid #f5b5b1;
  border-radius: 8px;
  padding: 10px;
}
.json-panel summary {
  cursor: pointer;
  margin-top: 18px;
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
}
.quote-readiness {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.quote-readiness h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}
.readiness-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b9cfe0;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}
.readiness-score span {
  color: var(--navy);
  font-weight: 900;
}
.readiness-score strong {
  font-size: 24px;
  color: var(--mixed);
}
.json-panel pre {
  margin: 12px 0 0;
  padding: 14px;
  min-height: 520px;
  overflow: auto;
  border-radius: 8px;
  background: #0b1f33;
  color: #e6f2ff;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    min-height: auto;
    height: auto;
    overflow-y: visible;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px;
    gap: 8px;
  }
  .brand-subtitle,
  .side-heading,
  .conversation-item span,
  .case-item span {
    display: none;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
  }
  .brand-title {
    font-size: 16px;
  }
  .new-chat-btn {
    min-height: 34px;
  }
  .side-tabs {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 6px;
  }
  .side-tab {
    padding: 8px;
    text-align: center;
    font-size: 13px;
  }
  .conversation-list,
  .case-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    flex: 0 0 auto;
    max-height: 150px;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 6px;
    max-width: 100%;
  }
  .conversation-item,
  .case-item {
    min-width: 0;
    padding: 8px;
  }
  .conversation-item strong,
  .case-item strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .main {
    padding: 10px;
  }
  .topbar {
    min-height: auto;
    padding: 14px;
  }
  .topbar h1 {
    font-size: 22px;
  }
  .chat-grid,
  .database-layout,
  .quotation-layout,
  .case-review-layout,
  .profile-layout,
  .docs-layout,
  .json-layout,
  .playbook-layout,
  .background-layout,
  .qa-layout,
  .evaluation-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .background-empty-profile-grid {
    grid-template-columns: 1fr;
  }
  .evaluation-subpanel.active {
    height: auto;
  }
  .outreach-subpanel.active,
  .outreach-subpanel .background-layout,
  .outreach-intel-split,
  .outreach-records-view {
    height: auto;
  }
  .outreach-page-toolbar,
  .outreach-intel-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .outreach-page-toolbar .inspector-toggle {
    align-self: flex-start;
  }
  .outreach-intel-stats,
  .outreach-intel-grid,
  .outreach-intel-grid.three,
  .outreach-intel-split,
  .outreach-records-view,
  .outreach-intel-filterbar,
  .outreach-intel-detail dl div,
  .outreach-record-grid,
  .outreach-record-fields div {
    grid-template-columns: 1fr;
  }
  .outreach-record-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .outreach-record-head {
    flex-direction: column;
  }
  .outreach-intel-table th:nth-child(4),
  .outreach-intel-table td:nth-child(4),
  .outreach-intel-table th:nth-child(5),
  .outreach-intel-table td:nth-child(5) {
    display: none;
  }
  .market-command-head,
  .market-command-grid,
  .market-decision-summary,
  .market-operating-row,
  .market-decision-grid,
  .market-drilldown-grid,
  .abm-system-grid {
    grid-template-columns: 1fr;
  }
  .market-map-stage {
    min-height: 300px;
  }
  .evaluation-layout,
  .system-chats-section,
  .system-chats-viewer {
    overflow: visible;
  }
  .inspector,
  .quotation-workspace-panel,
  .case-rag-panel,
  .evaluation-inspector {
    max-height: none;
    overflow: visible;
  }
  .case-filter-row {
    grid-template-columns: 1fr;
  }
  .chat-panel { min-height: 70vh; }
  .case-message.customer,
  .case-message.seller {
    width: 100%;
  }
  .message {
    max-width: 100%;
  }
  .message.message-has-audio {
    width: 100%;
    max-width: 100%;
  }
  .evaluation-viewer {
    grid-template-columns: 1fr;
  }
  .eval-run-list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .system-chats-viewer,
  .system-chat-review-grid {
    grid-template-columns: 1fr;
  }
  .system-chats-list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .evaluation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qa-summary-cards,
  .qa-detail-grid,
  .playbook-detail-grid,
  .background-score-grid,
  .outreach-brief-grid,
  .background-report-grid,
  .background-analyst-readiness,
  .background-fact-row,
  .background-evidence-lanes,
  .background-dossier-grid,
  .market-kpi-strip {
    grid-template-columns: 1fr;
  }
  .background-analytics-hero,
  .background-backlog-grid,
  .background-researchability-grid,
  .background-gap-item {
    grid-template-columns: 1fr;
  }
  .background-analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .background-analytics-bar-row {
    grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.4fr) minmax(44px, auto);
  }
  .background-analytics-bar-row em {
    display: none;
  }
  .background-country-readiness-table > div,
  .background-country-readiness-table > div.header {
    grid-template-columns: 1fr;
  }
  .qa-toolbar,
  .playbook-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar-status {
    justify-content: flex-start;
  }
  .composer-row {
    grid-template-columns: 40px 40px minmax(0, 1fr) 48px;
    gap: 8px;
  }
  .composer-row button[type="submit"] {
    grid-column: auto;
    min-height: 40px;
  }
  .composer-row .icon-btn,
  .composer-row .send-icon-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }
  .composer-row .send-icon-btn {
    width: 48px;
    min-width: 48px;
  }
  .attachment-chip {
    max-width: none;
    width: 100%;
  }
  .message-image-attachment,
  .message-video-attachment {
    width: 100%;
  }
  .message-audio-attachment audio {
    min-width: 0;
  }
  .profile-row,
  .profile-field {
    grid-template-columns: 1fr;
  }
  .invoice-item-preview {
    grid-template-columns: 1fr;
  }
  .market-brief-metrics,
  .feedback-form,
  .signal-lane-list {
    grid-template-columns: 1fr;
  }
  .market-map-stage {
    min-height: 240px;
  }
  .market-map-marker strong {
    max-width: 74px;
  }
}

/* Yichen-style dark rail pass. Keep this near the end so it overrides the
   older MVP shell without changing application behavior. */
.sidebar {
  background: #1f1e1a;
  color: #f8f6ee;
  border-right: 1px solid #2b2924;
  box-shadow: none;
}

.brand-icon {
  background: #f7f6ef;
  color: #111111;
  border-radius: 10px;
}

.brand-title {
  color: #fffaf0;
}

.brand-subtitle {
  color: #bdb7a6;
}

.new-chat-btn {
  background: #f7f6ef;
  color: #111111;
  border: 1px solid #ece8dc;
  border-radius: 10px;
  text-align: left;
  box-shadow: none;
}

.side-tab {
  background: transparent;
  color: #d8d1bf;
  border: 0;
  border-radius: 10px;
}

.side-tab:hover,
.side-tab:focus-visible {
  background: #2b2924;
  color: #fffaf0;
}

.side-tab.active {
  background: #32302b;
  color: #fffaf0;
  border-left: 0;
}

.side-heading {
  color: #a49b88;
}

.conversation-item,
.case-item,
.sidebar-loading {
  background: #2a2924;
  color: #f8f6ee;
  border: 1px solid #343129;
  border-radius: 10px;
  box-shadow: none;
}

.conversation-select {
  color: inherit;
  background: transparent;
}

.conversation-item strong,
.case-item strong {
  color: #f8f6ee;
}

.conversation-item span,
.case-item span {
  color: #bdb7a6;
}

.chat-delete {
  background: #37352e;
  border-color: #464237;
  color: #f8f6ee;
}

.chat-delete:hover,
.chat-delete:focus-visible {
  background: #474338;
  border-color: #5b5546;
  color: #ffffff;
}

.conversation-item.active,
.case-item.active {
  background: #f7f6ef;
  color: #111111;
  border-color: #f4a51c;
  box-shadow: inset 4px 0 0 #f4a51c;
}

.conversation-item.active .conversation-select,
.case-item.active .conversation-select {
  color: #111111;
}

.conversation-item.active strong,
.case-item.active strong {
  color: #111111;
}

.conversation-item.active span,
.case-item.active span {
  color: #6f6b61;
}

.conversation-item.active .chat-delete {
  background: #ffffff;
  border-color: #dad6cb;
  color: #111111;
}

.conversation-item.active .chat-delete:hover,
.conversation-item.active .chat-delete:focus-visible {
  background: #f3eee2;
  color: #111111;
}

.topbar,
.chat-container,
.customer-panel,
.tab-panel,
.quote-workbench,
.synthetic-card,
.sales-playbook-panel,
.evaluation-panel {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
}

.topbar {
  border-left: 0;
}

.mode-pill,
.build-badge,
.status-pill,
.tab-button {
  border-radius: 10px;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.tab-button.active,
.quote-tab.active {
  background: var(--navy);
  color: #fff;
}

.message.assistant .message-bubble,
.assistant-message,
.evidence-card,
.profile-card {
  background: var(--surface-2);
  border-color: var(--line);
}

.message.user .message-bubble,
.user-message {
  background: var(--navy);
  color: #fff;
}

.composer,
.composer textarea,
.composer-row textarea {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
}

.legacy-reference-control-hidden {
  display: none !important;
}

/* Final sidebar contrast guard.
   This intentionally sits last because older UI experiments left duplicate
   conversation-card rules earlier in the file. Keep the active chat readable
   on the light selected surface and inactive chats readable on the dark rail. */
.conversation-item {
  background: #2a2924 !important;
  color: #f8f6ee !important;
  border-color: #343129 !important;
}

.conversation-item .conversation-select,
.conversation-item strong {
  color: #f8f6ee !important;
}

.conversation-item span {
  color: #bdb7a6 !important;
}

.conversation-item .chat-delete {
  background: #37352e !important;
  border-color: #464237 !important;
  color: #f8f6ee !important;
}

.conversation-item.active {
  background: #f7f6ef !important;
  color: #111111 !important;
  border-color: #f4a51c !important;
}

.conversation-item.active .conversation-select,
.conversation-item.active strong {
  color: #111111 !important;
}

.conversation-item.active span {
  color: #6f6b61 !important;
}

.conversation-item.active .chat-delete {
  background: #ffffff !important;
  border-color: #dad6cb !important;
  color: #111111 !important;
}

/* CGCH blue/orange brand shell.
   Keep this final: the file contains older MVP and dark-rail experiments above,
   so this layer is the current source of truth for the customer demo UI. */
:root {
  --navy: #0b1e4f;
  --navy-2: #102f7a;
  --blue: #1e58ff;
  --blue-2: #1747d1;
  --orange: #ff9f1c;
  --orange-2: #ffb000;
  --bg: #f7f9fb;
  --panel: #ffffff;
  --line: #dbe5f1;
  --text: #081e3f;
  --muted: #607085;
  --surface-2: #f2f7ff;
  --surface-3: #e6f0ff;
  --text-3: #8a9ab0;
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 159, 28, .12), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #ffffff 48%, #fff7ec 100%);
  color: var(--text);
}

.app-shell {
  grid-template-columns: 288px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, #09225b 0%, #07337f 52%, #071b42 100%) !important;
  color: #fff !important;
  border-right: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 18px 0 50px rgba(8, 30, 63, .16) !important;
  padding: 18px 14px !important;
}

.brand-row {
  gap: 10px;
  min-height: 54px;
}

.brand-logo {
  width: 48px;
  height: 36px;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
}

.brand-icon {
  background: var(--orange) !important;
  color: var(--navy) !important;
}

.brand-title {
  color: #ffffff !important;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-subtitle {
  color: #dbe8ff !important;
}

.new-chat-btn {
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #1e58ff 0%, #0f45d8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(30, 88, 255, .28) !important;
}

.new-chat-btn:hover,
.new-chat-btn:focus-visible {
  background: linear-gradient(135deg, #ff9f1c 0%, #ffb000 100%) !important;
  color: var(--navy) !important;
  outline: 0;
}

.side-heading {
  color: #aecdff !important;
  letter-spacing: .08em;
}

.side-tab {
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #dbe8ff !important;
  font-weight: 800;
}

.side-tab:hover,
.side-tab:focus-visible {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: #ffffff !important;
  outline: 0;
}

.side-tab.active {
  background: rgba(30, 88, 255, .34) !important;
  border-color: rgba(255,255,255,.2) !important;
  color: #ffffff !important;
  box-shadow: inset 4px 0 0 var(--orange), 0 8px 20px rgba(0,0,0,.12) !important;
}

.conversation-item,
.case-item,
.sidebar-loading {
  background: rgba(255,255,255,.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.conversation-item:hover,
.case-item:hover {
  background: rgba(255,255,255,.16) !important;
}

.conversation-select,
.conversation-item strong,
.case-item strong {
  color: #ffffff !important;
}

.conversation-item span,
.case-item span {
  color: #bfd5ff !important;
}

.conversation-item .chat-delete {
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(255,255,255,.95) !important;
  color: var(--navy) !important;
}

.conversation-item .chat-delete:hover,
.conversation-item .chat-delete:focus-visible {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: var(--navy) !important;
}

.conversation-item.active,
.case-item.active {
  background: #ffffff !important;
  color: var(--navy) !important;
  border-color: var(--orange) !important;
  box-shadow: inset 4px 0 0 var(--orange), 0 16px 34px rgba(0,0,0,.18) !important;
}

.conversation-item.active .conversation-select,
.conversation-item.active strong,
.case-item.active .conversation-select,
.case-item.active strong {
  color: var(--navy) !important;
}

.conversation-item.active span,
.case-item.active span {
  color: #46607c !important;
}

.conversation-item.active .chat-delete {
  background: #fff7e8 !important;
  border-color: #ffc46b !important;
  color: #7a4c00 !important;
}

.main {
  padding: 18px 20px;
}

.topbar,
.chat-panel,
.inspector,
.case-thread,
.case-rag-panel,
.case-list-panel,
.profile-list-panel,
.profile-fields-panel,
.json-panel,
.docs-list-panel,
.doc-viewer-panel,
.playbook-list-panel,
.playbook-detail-panel,
.background-list-panel,
.background-report-panel,
.quote-workbench,
.synthetic-card,
.sales-playbook-panel,
.evaluation-panel {
  background: rgba(255,255,255,.96) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 42px rgba(8, 30, 63, .08) !important;
}

.topbar {
  border-left: 6px solid var(--orange) !important;
}

.topbar h1 {
  color: var(--navy);
}

.global-search input,
.composer textarea,
.composer-row textarea {
  border-color: #cbd8ea !important;
  border-radius: 10px !important;
  background: #fbfdff !important;
}

.status-pill,
.mode-pill,
.build-badge,
.tab-button,
.text-btn {
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
  color: var(--navy) !important;
}

.tab-button.active,
.quote-tab.active {
  background: var(--blue) !important;
  color: #ffffff !important;
}

.messages {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.message {
  border-radius: 14px;
}

.message.assistant {
  align-self: flex-start;
  background: #eef6ff !important;
  border: 1px solid #dbeafe !important;
  border-left: 5px solid var(--orange) !important;
  color: var(--text) !important;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0b3d83 0%, #1e58ff 100%) !important;
  border: 1px solid rgba(30, 88, 255, .45) !important;
  color: #ffffff !important;
}

.message.assistant::before,
.message.user::before {
  position: absolute;
  top: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 30, 63, .14);
}

.message.assistant {
  padding-left: 46px;
}

.message.assistant::before {
  content: "CG";
  left: 12px;
  background: var(--orange);
  color: var(--navy);
}

.message.user {
  padding-right: 46px;
}

.message.user::before {
  content: "C";
  right: 12px;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.55);
}

.message.assistant .message-bubble,
.assistant-message,
.evidence-card,
.profile-card {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
}

.message.user .message-bubble,
.user-message {
  background: var(--blue) !important;
  color: #ffffff !important;
}

.composer,
.composer textarea,
.composer-row textarea {
  background: #ffffff !important;
}

.composer .icon-btn,
.composer-row .icon-btn,
.composer button,
.send-icon-btn {
  background: var(--orange) !important;
  color: var(--navy) !important;
  border-color: var(--orange) !important;
}

.composer .icon-btn:hover,
.composer-row .icon-btn:hover,
.composer button:hover,
.send-icon-btn:hover {
  background: var(--orange-2) !important;
}

.inspector h2,
.quote-workbench h2,
.profile-summary strong {
  color: var(--navy);
}

.profile-row,
.profile-field,
.quote-card,
.source-card {
  border-color: var(--line) !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto !important;
    min-height: auto !important;
  }
  .brand-logo {
    width: 42px;
  }
}

/* CGCH blue/orange reference refresh.
   This final layer is intentionally last: previous design passes left dark rail
   and selected-card overrides above, so the production brand shell is defined
   here in one predictable place. */
:root {
  --navy: #061a36;
  --navy-2: #020b1f;
  --blue: #0d3a70;
  --blue-2: #082957;
  --sky: #e6f0ff;
  --orange: #ff9f1c;
  --orange-2: #ffb84a;
  --soft-orange: #ffe7d2;
  --bg: #f7f9fb;
  --panel: #ffffff;
  --line: #dbe5f2;
  --text: #0b1e4f;
  --muted: #64748b;
  --surface-2: #f6f9fe;
  --surface-3: #edf4ff;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(23, 74, 127, .08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f7f9fb 100%) !important;
  color: var(--text) !important;
}

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(165deg, #0d3a70 0%, #082957 48%, #020b1f 100%) !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 10px 0 32px rgba(8, 30, 74, .18) !important;
  padding: 20px 16px !important;
}

.brand-row {
  min-height: 48px;
  gap: 12px !important;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.95);
  padding: 5px;
  box-shadow: 0 10px 22px rgba(8, 30, 74, .22);
}

.brand-title {
  color: #ffffff !important;
  font-size: 18px !important;
  letter-spacing: 0 !important;
}

.brand-subtitle {
  color: rgba(255,255,255,.78) !important;
}

.new-chat-btn {
  min-height: 44px !important;
  background: linear-gradient(135deg, var(--orange), var(--orange-2)) !important;
  color: var(--navy) !important;
  border: 0 !important;
  border-radius: 10px !important;
  text-align: left !important;
  box-shadow: 0 12px 26px rgba(255, 159, 28, .28) !important;
}

.side-tab {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.86) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.side-tab:hover,
.side-tab:focus-visible {
  background: rgba(255,255,255,.16) !important;
  color: #ffffff !important;
}

.side-tab.active {
  background: #ffffff !important;
  color: var(--navy) !important;
  border-color: #ffffff !important;
  box-shadow: inset 4px 0 0 var(--orange), 0 10px 24px rgba(8, 30, 74, .18) !important;
}

.side-heading {
  color: rgba(255,255,255,.78) !important;
  letter-spacing: 0 !important;
}

.conversation-item,
.case-item,
.sidebar-loading {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.conversation-item .conversation-select,
.conversation-item strong,
.case-item strong {
  color: #ffffff !important;
}

.conversation-item span,
.case-item span {
  color: rgba(230,240,255,.78) !important;
}

.chat-delete {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.22) !important;
  color: #ffffff !important;
}

.conversation-item.active,
.case-item.active {
  background: #ffffff !important;
  border-color: var(--orange) !important;
  color: var(--navy) !important;
  box-shadow: inset 4px 0 0 var(--orange), 0 12px 28px rgba(8, 30, 74, .16) !important;
}

.conversation-item.active .conversation-select,
.conversation-item.active strong,
.case-item.active strong {
  color: var(--navy) !important;
}

.conversation-item.active span,
.case-item.active span {
  color: #475569 !important;
}

.conversation-item.active .chat-delete {
  background: #f3f7ff !important;
  border-color: #dbe5f2 !important;
  color: #28415f !important;
}

.main {
  background: transparent !important;
  padding: 16px 20px !important;
}

.topbar,
.chat-panel,
.inspector,
.case-thread,
.case-rag-panel,
.case-list-panel,
.profile-list-panel,
.profile-fields-panel,
.json-panel,
.docs-list-panel,
.doc-viewer-panel,
.playbook-list-panel,
.playbook-detail-panel,
.background-list-panel,
.background-report-panel,
.quote-workbench,
.synthetic-card,
.sales-playbook-panel,
.evaluation-panel {
  background: rgba(255,255,255,.96) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 42px rgba(8, 30, 74, .08) !important;
}

.topbar {
  border-left: 6px solid var(--orange) !important;
  min-height: 104px !important;
}

.topbar h1,
.section-title h2,
.inspector h2 {
  color: var(--navy) !important;
}

.topbar p,
.mini-label,
.profile-row span,
.profile-field span {
  color: var(--muted) !important;
}

.global-search input,
input[type="search"],
.composer textarea,
.composer-row textarea,
textarea,
select {
  border-color: #cbd8ea !important;
  border-radius: 10px !important;
  background: #fbfdff !important;
  color: var(--text) !important;
}

.status-pill,
.mode-pill,
.build-badge,
.tab-button,
.text-btn,
.inspector-toggle button,
.evaluation-inner-tab {
  border-color: var(--line) !important;
  background: #f5f8fe !important;
  color: var(--navy) !important;
  border-radius: 10px !important;
}

.tab-button.active,
.quote-tab.active,
.inspector-toggle button.active,
.evaluation-inner-tab.active {
  background: var(--blue) !important;
  color: #ffffff !important;
  border-color: var(--blue) !important;
}

.chat-grid {
  gap: 16px !important;
}

.messages {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.message {
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(8, 30, 74, .06);
}

.message-copy-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.message-copy-line {
  position: relative;
  display: block;
  white-space: normal;
  max-width: 100%;
  min-height: 0;
}

.message-copy-content {
  white-space: pre-wrap;
  text-align: left;
  line-height: 1.43;
}

.message-time-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  min-height: 0;
}

.message-time {
  margin: 0;
  color: rgba(11, 30, 79, .52);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.message.user .message-time {
  color: rgba(255,255,255,.74);
}

.message.assistant {
  align-self: flex-start;
  width: fit-content !important;
  max-width: min(980px, 82%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 0 !important;
  color: var(--text) !important;
  padding: 0 58px 0 40px !important;
  box-shadow: none !important;
}

.message.user {
  align-self: flex-end;
  width: fit-content !important;
  max-width: min(980px, 76%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: linear-gradient(135deg, var(--blue-2) 0%, var(--blue) 100%) !important;
  border: 1px solid rgba(36, 82, 132, .40) !important;
  color: #ffffff !important;
  padding: 10px 50px 10px 14px !important;
}

.message.assistant.has-dev-debug,
.message.assistant.has-message-translation,
.message.assistant.has-dev-debug.has-message-translation {
  padding-right: 58px !important;
}

.message.user.has-dev-debug,
.message.user.has-message-translation,
.message.user.has-dev-debug.has-message-translation {
  padding-right: 50px !important;
}

.message.assistant .message-text,
.message.user .message-text {
  width: auto !important;
  max-width: 100% !important;
}

.message.assistant .message-copy-stack,
.message.user .message-copy-stack {
  align-items: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
}

.message.assistant .message-copy-line {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 0 !important;
  background: #f6f9fe;
  border: 1px solid #dbeafe;
  border-left: 5px solid var(--orange);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(8, 30, 74, .06);
  padding: 9px 14px;
  line-height: 1.43;
}

.message.user .message-copy-stack {
  gap: 0;
}

.message.user .message-copy-line {
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.message.user .message-copy-content {
  color: #ffffff !important;
}

.message.assistant::before,
.message.user::before {
  position: absolute;
  top: 11px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 30, 74, .14);
}

.message.assistant::before {
  content: "CG";
  left: 0;
  background: var(--orange);
  color: var(--navy);
}

.message.user::before {
  content: "C";
  right: 12px;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.55);
}

.composer {
  background: #ffffff !important;
  border-top-color: var(--line) !important;
}

.composer .icon-btn,
.composer-row .icon-btn,
.composer button,
.send-icon-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-2)) !important;
  color: var(--navy) !important;
  border-color: var(--orange) !important;
}

.evidence-card,
.profile-card,
.source-card,
.quote-card {
  background: #ffffff !important;
  border-color: var(--line) !important;
  border-radius: 12px !important;
}

.case-messages,
.json-thread,
.json-message-list {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%) !important;
}

.case-message.seller,
.json-message.seller {
  background: #f6f9fe !important;
  border: 1px solid #dbeafe !important;
  border-left: 5px solid var(--orange) !important;
  color: var(--text) !important;
  box-shadow: 0 10px 24px rgba(8, 30, 74, .06) !important;
}

.case-message.seller *,
.json-message.seller * {
  color: inherit;
}

.case-message.seller .case-bubble-head strong,
.json-message.seller .case-bubble-head strong {
  color: var(--navy) !important;
}

.case-message.seller .case-bubble-head span,
.json-message.seller .case-bubble-head span {
  color: var(--muted) !important;
}

.case-message.seller p,
.json-message.seller p {
  color: var(--text) !important;
}

.case-message.seller .json-message-info summary,
.json-message.seller .json-message-info summary {
  background: #ffffff !important;
  border-color: #c8d7e4 !important;
  color: var(--navy) !important;
}

.case-message.seller .json-message-info pre,
.json-message.seller .json-message-info pre {
  background: #ffffff !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

.json-message.seller .json-quote,
.json-message.seller .json-translation,
.json-message.seller .json-attachments,
.json-message.seller .json-note {
  background: #ffffff !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

.json-message.seller .json-translation span {
  color: var(--muted) !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto !important;
    min-height: auto !important;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }
}

/* Active chatbot compact-bubble guard.
   Keep this at the end: older redesign rules above can otherwise stretch
   split reply segments into oversized cards or pin timestamps at the top. */
#chatTab #messages {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 9px !important;
  padding: 10px 16px 12px !important;
}

#chatTab #messages .message {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  text-align: left !important;
  overflow: visible !important;
  line-height: 1.45 !important;
  place-items: initial !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  transform: none !important;
}

#chatTab #messages .message.assistant {
  align-self: flex-start !important;
  width: auto !important;
  max-width: min(850px, 78%) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 48px 0 34px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

#chatTab #messages .message.user {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: min(980px, 72%) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 9px 42px 8px 14px !important;
}

#chatTab #messages .message .message-text {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

#chatTab #messages .message-copy-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#chatTab #messages .message-copy-line {
  box-sizing: border-box !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  place-items: initial !important;
  align-content: flex-start !important;
  justify-content: flex-start !important;
}

#chatTab #messages .message.assistant .message-copy-line {
  width: fit-content !important;
  max-width: min(780px, 100%) !important;
  padding: 8px 12px 7px !important;
  background: #f6f9fe !important;
  border: 1px solid #dbeafe !important;
  border-left: 4px solid var(--orange) !important;
  border-radius: 10px !important;
  box-shadow: 0 7px 16px rgba(8, 30, 74, .05) !important;
}

#chatTab #messages .message.user .message-copy-stack {
  display: block !important;
  gap: 0 !important;
  width: auto !important;
}

#chatTab #messages .message.user .message-copy-line {
  width: auto !important;
  max-width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message-copy-content {
  display: block !important;
  white-space: pre-wrap !important;
  text-align: left !important;
  line-height: 1.42 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

#chatTab #messages .message-time-row {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

#chatTab #messages .message-time {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  color: rgba(11, 30, 79, .48) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .72) !important;
}

/* Active chat customer bubble repair v2.
   This must stay at EOF: customer text, timestamp, and controls need separate
   layout boxes so they cannot overlap on narrow widths. */
#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  align-self: flex-end !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  width: fit-content !important;
  max-width: min(760px, 72vw) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message.user::before {
  content: none !important;
  display: none !important;
}

#chatTab #messages .message.user .message-text,
#chatTab #messages .message.user .message-copy-stack {
  align-items: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
}

#chatTab #messages .message.user .message-copy-line {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 10px 14px 9px !important;
  background: linear-gradient(135deg, var(--blue-2) 0%, var(--blue) 100%) !important;
  border: 1px solid rgba(36, 82, 132, .40) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 55, 95, .08) !important;
  color: #fff !important;
}

#chatTab #messages .message.user .message-copy-content {
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#chatTab #messages .message.user .message-time-row {
  justify-content: flex-end !important;
  margin-top: 5px !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .74) !important;
}

#chatTab #messages .message.user .message-detail-panels {
  justify-content: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 0 !important;
}

#chatTab #messages .message-reply-failure {
  max-width: min(560px, 72vw) !important;
  margin-top: 4px !important;
  padding: 5px 8px !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  background: #fff7f7 !important;
  color: #9f1239 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

/* Active chat customer bubble repair.
   Keep this last so the customer text bubble, timestamp, and controls do not
   overlap on narrow message widths. */
#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  align-self: flex-end !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  width: fit-content !important;
  max-width: min(760px, 72vw) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message.user::before {
  content: none !important;
  display: none !important;
}

#chatTab #messages .message.user .message-text,
#chatTab #messages .message.user .message-copy-stack {
  align-items: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
}

#chatTab #messages .message.user .message-copy-line {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 10px 14px 9px !important;
  background: linear-gradient(135deg, var(--blue-2) 0%, var(--blue) 100%) !important;
  border: 1px solid rgba(36, 82, 132, .40) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 55, 95, .08) !important;
  color: #fff !important;
}

#chatTab #messages .message.user .message-copy-content {
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#chatTab #messages .message.user .message-time-row {
  justify-content: flex-end !important;
  margin-top: 5px !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .74) !important;
}

#chatTab #messages .message.user .message-detail-panels {
  justify-content: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 0 !important;
}

#chatTab #messages .message-reply-failure {
  max-width: min(560px, 72vw) !important;
  margin-top: 4px !important;
  padding: 5px 8px !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  background: #fff7f7 !important;
  color: #9f1239 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

/* Active chat compact layout v2.
   This intentionally stays last so old bubble/card experiments above cannot
   stretch live chat replies or pin action buttons to the first split segment. */
#chatTab #messages {
  gap: 8px !important;
  padding: 10px 14px 12px !important;
}

#chatTab #messages .message {
  position: relative !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  overflow: visible !important;
  transform: none !important;
}

#chatTab #messages .message.assistant,
#chatTab #messages .message.assistant.has-dev-debug,
#chatTab #messages .message.assistant.has-message-translation,
#chatTab #messages .message.assistant.has-dev-debug.has-message-translation {
  align-self: flex-start !important;
  width: fit-content !important;
  max-width: min(900px, calc(100% - 72px)) !important;
  padding: 0 0 0 30px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

#chatTab #messages .message.user {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: min(980px, 72%) !important;
  min-width: 0 !important;
  padding: 8px 38px 7px 13px !important;
  border-radius: 8px !important;
}

#chatTab #messages .message .message-text,
#chatTab #messages .message-copy-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message-copy-stack {
  gap: 6px !important;
}

#chatTab #messages .message-copy-line {
  box-sizing: border-box !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  text-align: left !important;
}

#chatTab #messages .message.assistant .message-copy-line {
  width: fit-content !important;
  max-width: min(860px, 100%) !important;
  padding: 8px 11px 6px !important;
  background: #f7faff !important;
  border: 1px solid #dbeafe !important;
  border-left: 3px solid var(--orange) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(15, 55, 95, .045) !important;
}

#chatTab #messages .message.user .message-copy-stack,
#chatTab #messages .message.user .message-copy-line {
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message-copy-content,
#chatTab #messages .message-copy-content * {
  text-align: left !important;
  vertical-align: baseline !important;
}

#chatTab #messages .message-copy-content {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: pre-wrap !important;
  line-height: 1.4 !important;
  font-size: 14px !important;
}

#chatTab #messages .message-time-row {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}

#chatTab #messages .message-time {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(11, 30, 79, .50) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .72) !important;
}

#chatTab #messages .message-detail-panels {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: min(860px, 100%) !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel,
#chatTab #messages .message-detail-panels .message-translation-panel {
  position: static !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  white-space: normal !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel[open],
#chatTab #messages .message-detail-panels .message-translation-panel[open] {
  flex: 1 0 100% !important;
  width: 100% !important;
  margin-top: 2px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel > summary,
#chatTab #messages .message-detail-panels .message-translation-panel > summary,
#chatTab #messages .message.has-dev-debug .message-detail-panels .message-translation-panel > summary {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
}

#chatTab #messages .message-detail-panels .dev-debug-body,
#chatTab #messages .message-detail-panels .message-translation-body {
  width: 100% !important;
  max-width: min(860px, 100%) !important;
  margin: 6px 0 0 !important;
}

#chatTab #messages .message.assistant::before {
  top: 6px !important;
  left: 0 !important;
}

#chatTab #messages .message.user::before {
  top: 7px !important;
}

#chatTab #messages .message-version-badge {
  top: auto !important;
  right: 8px !important;
  bottom: 3px !important;
}

#chatTab #messages .message.assistant::before {
  top: 8px !important;
  left: 0 !important;
}

#chatTab #messages .message.user::before {
  top: 8px !important;
}

/* Final active-chat bubble guard: keep generated split paragraphs compact. */
#chatTab #messages .message.assistant {
  align-self: flex-start !important;
  width: fit-content !important;
  max-width: min(860px, 74vw) !important;
  min-height: 0 !important;
  padding: 0 44px 0 34px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message.user {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: min(880px, 74vw) !important;
  min-height: 0 !important;
  padding: 9px 40px 8px 14px !important;
  line-height: 1.45 !important;
}

#chatTab #messages .message.assistant .message-text {
  display: block !important;
  width: fit-content !important;
  max-width: min(820px, 74vw) !important;
}

#chatTab #messages .message.assistant .message-copy-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 7px !important;
  width: fit-content !important;
  max-width: min(820px, 74vw) !important;
}

#chatTab #messages .message.assistant .message-copy-line {
  display: block !important;
  width: fit-content !important;
  max-width: min(780px, 74vw) !important;
  min-height: 0 !important;
  padding: 9px 13px 8px !important;
  margin: 0 !important;
  background: #f6f9fe !important;
  border: 1px solid #dceafb !important;
  border-left: 4px solid var(--orange) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(15, 55, 95, 0.08) !important;
}

#chatTab #messages .message.assistant .message-copy-content,
#chatTab #messages .message.assistant .message-copy-content * {
  text-align: left !important;
}

#chatTab #messages .message.assistant .message-copy-content {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  line-height: 1.48 !important;
}

#chatTab #messages .message.assistant .message-time-row,
#chatTab #messages .message.user .message-time-row {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

#chatTab #messages .message.assistant .message-time,
#chatTab #messages .message.user .message-time {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6f8198 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}

/* Active chat final compact layout.
   This must stay last: the live chat should show one backend message as several
   slim visual bubbles, not a large synthetic-convo style card. */
#chatTab #messages {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 10px 14px 12px !important;
}

#chatTab #messages .message {
  position: relative !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  transform: none !important;
  text-align: left !important;
  line-height: 1.42 !important;
  overflow: visible !important;
  place-items: unset !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

#chatTab #messages .message.assistant {
  align-self: flex-start !important;
  width: auto !important;
  max-width: calc(100% - 88px) !important;
  padding: 0 36px 0 34px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

#chatTab #messages .message.user {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: min(980px, 72%) !important;
  min-width: 0 !important;
  padding: 8px 38px 7px 13px !important;
  border-radius: 10px !important;
}

#chatTab #messages .message .message-text {
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message-copy-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#chatTab #messages .message-copy-line {
  box-sizing: border-box !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  text-align: left !important;
  place-items: unset !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

#chatTab #messages .message.assistant .message-copy-line {
  display: inline-block !important;
  width: auto !important;
  max-width: min(840px, 100%) !important;
  padding: 9px 12px 8px !important;
  background: #f6f9fe !important;
  border: 1px solid #dbeafe !important;
  border-left: 4px solid var(--orange) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 55, 95, .06) !important;
}

#chatTab #messages .message.user .message-copy-stack,
#chatTab #messages .message.user .message-copy-line {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message-copy-content,
#chatTab #messages .message-copy-content * {
  text-align: left !important;
  vertical-align: baseline !important;
}

#chatTab #messages .message-copy-content {
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: pre-wrap !important;
  line-height: 1.42 !important;
}

#chatTab #messages .message-version-badge {
  display: none !important;
}

#chatTab #messages .message-time-row {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
}

#chatTab #messages .message-time {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(11, 30, 79, .50) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .72) !important;
}

/* Active chat customer bubble repair v3.
   This must stay at EOF: customer text, timestamp, and controls need separate
   layout boxes so they cannot overlap on narrow widths. */
#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  align-self: flex-end !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  width: fit-content !important;
  max-width: min(760px, 72vw) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chatTab #messages .message.user::before {
  content: none !important;
  display: none !important;
}

#chatTab #messages .message.user .message-text,
#chatTab #messages .message.user .message-copy-stack {
  align-items: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
}

#chatTab #messages .message.user .message-copy-line {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 10px 14px 9px !important;
  background: linear-gradient(135deg, var(--blue-2) 0%, var(--blue) 100%) !important;
  border: 1px solid rgba(36, 82, 132, .40) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 55, 95, .08) !important;
  color: #fff !important;
}

#chatTab #messages .message.user .message-copy-content {
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#chatTab #messages .message.user .message-time-row {
  justify-content: flex-end !important;
  margin-top: 5px !important;
}

#chatTab #messages .message.user .message-time {
  color: rgba(255, 255, 255, .74) !important;
}

#chatTab #messages .message.user .message-detail-panels {
  justify-content: flex-end !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 0 !important;
}

#chatTab #messages .message-reply-failure {
  max-width: min(560px, 72vw) !important;
  margin-top: 4px !important;
  padding: 5px 8px !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  background: #fff7f7 !important;
  color: #9f1239 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

/* Active chat customer bubble width guard v6.
   Keep customer messages readable and visibly separated without forcing every
   short follow-up into the same full-width slab. */
#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(760px, 72%) !important;
  margin: 10px 0 !important;
}

#chatTab #messages .message.user .message-text,
#chatTab #messages .message.user .message-copy-stack {
  width: 100% !important;
  max-width: 100% !important;
}

#chatTab #messages .message.user .message-copy-line {
  width: fit-content !important;
  min-width: min(280px, calc(100vw - 64px)) !important;
  max-width: 100% !important;
  border-radius: 12px !important;
}

#chatTab #messages .message.user .message-copy-stack {
  gap: 10px !important;
}

#chatTab #messages .message.user .message-copy-content {
  max-width: 100% !important;
  overflow-wrap: break-word !important;
}

/* Active chat spacing-only guard v10.
   Preserve the existing seller split-bubble renderer. Reserve extra row space
   for seller messages based on their split-bubble count. */
#chatTab #messages {
  gap: 30px !important;
}

#chatTab #messages .message.assistant,
#chatTab #messages .message.assistant.has-dev-debug,
#chatTab #messages .message.assistant.has-message-translation,
#chatTab #messages .message.assistant.has-dev-debug.has-message-translation {
  margin: 0 0 44px 0 !important;
  overflow: visible !important;
}

#chatTab #messages .message.assistant.message-has-split-bubbles,
#chatTab #messages .message.assistant.message-has-split-bubbles.has-dev-debug,
#chatTab #messages .message.assistant.message-has-split-bubbles.has-message-translation,
#chatTab #messages .message.assistant.message-has-split-bubbles.has-dev-debug.has-message-translation {
  margin-bottom: calc(44px + (var(--seller-segment-extra, 0) * 68px)) !important;
  padding-bottom: 0 !important;
}

#chatTab #messages .message.assistant .message-text,
#chatTab #messages .message.assistant .message-copy-stack {
  overflow: visible !important;
}

#chatTab #messages .message.assistant .message-copy-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

#chatTab #messages .message.assistant .message-copy-line {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  overflow: visible !important;
}

#chatTab #messages .message.assistant .message-copy-line + .message-copy-line {
  margin-top: 0 !important;
}

#chatTab #messages .message.assistant .message-detail-panels {
  margin-top: 14px !important;
}

#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  margin: 10px 0 !important;
}

#chatTab #messages .message.user + .message.user {
  margin-top: 60px !important;
}

#chatTab #messages .message.user .message-copy-stack {
  gap: 18px !important;
}

#chatTab #messages .message.user .message-copy-line {
  min-width: min(170px, calc(100vw - 88px)) !important;
}

/* Active chat side-control rail v1.
   Keep action buttons beside the avatar rail, while opened panels stay in
   normal document flow so later messages are pushed down. */
#chatTab #messages .message.assistant,
#chatTab #messages .message.assistant.has-dev-debug,
#chatTab #messages .message.assistant.has-message-translation,
#chatTab #messages .message.assistant.has-dev-debug.has-message-translation {
  position: relative !important;
  padding-left: 42px !important;
  padding-right: 0 !important;
}

#chatTab #messages .message.user,
#chatTab #messages .message.user.has-message-translation,
#chatTab #messages .message.user.has-dev-debug,
#chatTab #messages .message.user.has-dev-debug.has-message-translation {
  position: relative !important;
  padding-right: 42px !important;
}

#chatTab #messages .message.assistant::before,
#chatTab #messages .message.user::before {
  position: absolute !important;
  top: 0 !important;
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(8, 30, 74, .14) !important;
  z-index: 3 !important;
}

#chatTab #messages .message.assistant::before {
  content: "CG" !important;
  left: 0 !important;
  right: auto !important;
  background: var(--orange) !important;
  color: var(--navy) !important;
  border: 0 !important;
}

#chatTab #messages .message.user::before {
  content: "C" !important;
  right: 0 !important;
  left: auto !important;
  background: var(--blue) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.55) !important;
}

#chatTab #messages .message-detail-panels {
  position: static !important;
  display: block !important;
  width: 100% !important;
  max-width: min(900px, 100%) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

#chatTab #messages .message.assistant .message-detail-panels {
  margin-top: 0 !important;
}

#chatTab #messages .message.user .message-detail-panels {
  margin-top: 0 !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel,
#chatTab #messages .message-detail-panels .message-translation-panel {
  position: static !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel[open],
#chatTab #messages .message-detail-panels .message-translation-panel[open] {
  height: auto !important;
  min-height: 0 !important;
  margin-top: 14px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel > summary,
#chatTab #messages .message-detail-panels .message-translation-panel > summary,
#chatTab #messages .message.has-dev-debug .message-detail-panels .message-translation-panel > summary {
  position: absolute !important;
  inset: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #b9cfe0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: var(--navy) !important;
  box-shadow: 0 1px 4px rgba(8, 36, 59, .10) !important;
  cursor: pointer !important;
  list-style: none !important;
  z-index: 4 !important;
}

#chatTab #messages .message.assistant .message-detail-panels .dev-debug-panel > summary,
#chatTab #messages .message.assistant .message-detail-panels .message-translation-panel > summary {
  left: 0 !important;
  right: auto !important;
  top: 34px !important;
}

#chatTab #messages .message.assistant.has-dev-debug .message-detail-panels .message-translation-panel > summary {
  left: 0 !important;
  right: auto !important;
  top: 68px !important;
}

#chatTab #messages .message.user .message-detail-panels .dev-debug-panel > summary,
#chatTab #messages .message.user .message-detail-panels .message-translation-panel > summary {
  right: 0 !important;
  left: auto !important;
  top: 34px !important;
}

#chatTab #messages .message.user.has-dev-debug .message-detail-panels .message-translation-panel > summary {
  right: 0 !important;
  left: auto !important;
  top: 68px !important;
}

#chatTab #messages .message-detail-panels .dev-debug-panel[open] > summary,
#chatTab #messages .message-detail-panels .message-translation-panel[open] > summary {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #102a43 !important;
}

#chatTab #messages .message-detail-panels .dev-debug-body,
#chatTab #messages .message-detail-panels .message-translation-body {
  display: block !important;
  width: 100% !important;
  max-width: min(900px, 100%) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#chatTab #messages .message.assistant .message-detail-panels .dev-debug-body,
#chatTab #messages .message.assistant .message-detail-panels .message-translation-body {
  margin-left: 0 !important;
}

#chatTab #messages .message.user .message-detail-panels .message-translation-body,
#chatTab #messages .message.user .message-detail-panels .dev-debug-body {
  margin-left: 0 !important;
  text-align: left !important;
}

.background-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0 12px;
}

.background-manual-form input {
  min-width: 0;
  height: 38px;
}

.background-manual-form .text-btn {
  height: 38px;
  white-space: nowrap;
}

.background-profile-lock {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #f1c877;
  border-radius: 8px;
  background: #fff8e7;
  padding: 12px;
}

.background-compliance-lock {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  padding: 12px;
}

.background-profile-lock strong,
.background-compliance-lock strong {
  display: block;
  color: #7a4a00;
  margin-top: 2px;
}

.background-compliance-lock strong {
  color: #991b1b;
}

.background-profile-lock p,
.background-profile-lock li,
.background-compliance-lock p,
.background-compliance-lock li {
  color: #5d4a2f;
  font-size: 12px;
  line-height: 1.45;
}

.background-compliance-lock p,
.background-profile-lock p {
  margin: 5px 0 0;
}

.background-compliance-lock ul,
.background-profile-lock ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .background-profile-lock,
  .background-compliance-lock {
    grid-template-columns: 1fr;
  }
}

.background-hypothesis-list,
.background-auditor-list {
  display: grid;
  gap: 10px;
}

.background-hypothesis,
.background-auditor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.background-hypothesis strong,
.background-auditor strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.background-hypothesis span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.background-hypothesis p,
.background-auditor p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.background-hypothesis.unverified {
  border-color: #f3dbab;
  background: #fffaf0;
}

.background-hypothesis.unverified span {
  background: #fff2d6;
  color: #8a5700;
}

.background-auditor.blocker {
  border-color: #fecaca;
  background: #fff7f7;
}

.background-auditor.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.background-auditor.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

/* Active chat flow-clearance guard v1.
   Open detail panels can overflow older bubble wrappers; reserve measured row
   space so the next message always starts below the previous message bottom. */
#chatTab #messages {
  gap: 24px !important;
}

#chatTab #messages .message {
  flex: 0 0 auto !important;
  padding-bottom: var(--message-panel-clearance, 0px) !important;
}

#chatTab #messages .message.user + .message.user {
  margin-top: 26px !important;
}

#chatTab #messages .message.assistant + .message.user,
#chatTab #messages .message.user + .message.assistant {
  margin-top: 0 !important;
}

/* Active chat transition spacing guard v1.
   Do not alter seller split-line spacing or customer-to-seller spacing. Only
   trim over-reserved space for seller-to-customer and quick customer chains. */
#chatTab #messages .message.assistant:has(+ .message.user),
#chatTab #messages .message.assistant.message-has-split-bubbles:has(+ .message.user),
#chatTab #messages .message.assistant.has-dev-debug:has(+ .message.user),
#chatTab #messages .message.assistant.has-message-translation:has(+ .message.user),
#chatTab #messages .message.assistant.has-dev-debug.has-message-translation:has(+ .message.user),
#chatTab #messages .message.assistant.message-has-split-bubbles.has-dev-debug:has(+ .message.user),
#chatTab #messages .message.assistant.message-has-split-bubbles.has-message-translation:has(+ .message.user),
#chatTab #messages .message.assistant.message-has-split-bubbles.has-dev-debug.has-message-translation:has(+ .message.user) {
  margin-bottom: 0 !important;
}

#chatTab #messages .message.user:has(+ .message.user) {
  margin-bottom: 0 !important;
}

#chatTab #messages .message.user + .message.user {
  margin-top: -8px !important;
}

/* Customer Background analyst dossier polish v1. */
.background-report-panel,
.background-detail,
.background-compact-panel,
.background-card:is(.background-fact-table-card, .background-evidence-lanes-card, .background-dossier-card, .background-deep-gaps-card, .background-next-research-card, .background-research-gaps-card, .background-source-dossier) {
  min-width: 0;
}

.background-detail :is(h2, h3, strong, p, li, span, em, a, code),
.background-report-toolbar :is(h2, strong, span),
.background-compact-panel :is(h3, strong, p, li, span, em) {
  overflow-wrap: anywhere;
}

.background-hero {
  background: #fbfdff;
  padding: 18px;
}

.background-hero h3 {
  font-size: 26px;
  line-height: 1.18;
}

.background-hero p {
  font-size: 14px;
}

.background-card:is(.background-fact-table-card, .background-evidence-lanes-card, .background-dossier-card, .background-deep-gaps-card, .background-next-research-card, .background-research-gaps-card, .background-source-dossier) {
  border-color: #d5e2ec;
  background: #fff;
  padding: 16px;
}

.background-analyst-brief-card {
  border-color: #cbdbea;
  background: #fdfefe;
  padding: 16px;
}

.background-brief-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 150px);
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid #e3edf5;
  padding-bottom: 12px;
}

.background-brief-header h3 {
  margin: 2px 0 6px;
  font-size: 20px;
  line-height: 1.22;
}

.background-brief-header p {
  margin: 0;
  color: #53677c;
  line-height: 1.45;
}

.background-brief-score {
  display: grid;
  gap: 2px;
  justify-items: end;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.background-brief-score span,
.background-brief-score em {
  color: #5c7188;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}

.background-brief-score strong {
  color: #0e2746;
  font-size: 30px;
  line-height: 1;
}

.background-required-fact-audit {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.background-required-fact-audit span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid #d7e3ed;
  border-radius: 999px;
  background: #fff;
  color: #52677d;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.background-required-fact-audit .passed {
  border-color: #bfe4d1;
  background: #f5fff9;
  color: #116343;
}

.background-required-fact-audit .missing {
  border-color: #f0c8bc;
  background: #fff8f5;
  color: #92321f;
}

.background-brief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.background-brief-grid article {
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #7fa6c6;
  border-radius: 7px;
  background: #fff;
  padding: 10px 11px;
}

.background-brief-grid article.source-backed {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-brief-grid article.derived-signal {
  border-left-color: #d97706;
  background: #fff8eb;
}

.background-brief-grid article.evidence-summary {
  border-left-color: #2f80aa;
}

.background-brief-grid article.dossier-warning {
  border-color: #efc9c9;
  border-left-color: #d94a38;
  background: #fff8f6;
}

.background-brief-grid strong {
  display: block;
  margin-bottom: 7px;
  color: #152f4e;
  font-size: 13px;
  line-height: 1.3;
}

.background-brief-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 16px;
}

.background-brief-grid li {
  color: #465a70;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.background-brief-grid small {
  display: block;
  margin-top: 2px;
  color: #718399;
  font-size: 11px;
  line-height: 1.25;
}

.background-brief-grid a {
  overflow-wrap: anywhere;
}

.background-brief-gap-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
  margin-top: 12px;
  border-top: 1px solid #f0d9a5;
  padding-top: 10px;
}

.background-brief-gap-strip strong {
  flex: 0 0 auto;
  color: #7a4c00;
  font-size: 12px;
  line-height: 1.4;
}

.background-brief-gap-strip span {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid #f0cf91;
  border-radius: 999px;
  background: #fff8e8;
  color: #735022;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.background-analytics,
.background-analytics-hero,
.background-analytics-kpis,
.background-analytics-kpis article,
.background-research-backlog,
.background-backlog-grid,
.background-backlog-grid article {
  min-width: 0;
}

.background-analytics-hero {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
}

.background-analytics-kpis {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
}

.background-analytics-kpis article {
  overflow: hidden;
}

.background-analytics-kpis span,
.background-analytics-kpis strong,
.background-analytics-kpis em {
  overflow-wrap: anywhere;
}

.background-card:is(.background-fact-table-card, .background-evidence-lanes-card, .background-dossier-card, .background-deep-gaps-card, .background-next-research-card, .background-research-gaps-card, .background-source-dossier) > h3 {
  margin-bottom: 12px;
  border-bottom: 1px solid #e3edf5;
  padding-bottom: 10px;
  font-size: 16px;
  line-height: 1.25;
}

.background-analyst-readiness {
  min-width: 0;
  background: #fbfdff;
}

.background-analyst-readiness > div {
  min-width: 0;
}

.background-analyst-readiness h3 {
  font-size: 18px;
  line-height: 1.28;
}

.background-readiness-checks span {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
}

.background-readiness-checks span::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: .38em;
  border-radius: 999px;
  background: #8fa1b4;
}

.background-readiness-checks .passed::before {
  background: #1f9d7a;
}

.background-readiness-checks .missing::before {
  background: #f8a61b;
}

.background-fact-table {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
}

.background-fact-row {
  min-width: 0;
  grid-template-columns: minmax(120px, .65fr) minmax(180px, 1fr) minmax(220px, 1.35fr);
  gap: 12px;
  border: 0;
  border-top: 1px solid #e4edf4;
  border-left: 4px solid #c7d4df;
  border-radius: 0;
  background: #fff;
  padding: 11px 12px;
}

.background-fact-row:first-child {
  border-top: 0;
}

.background-fact-row.source-backed,
.background-fact-row.confirmed,
.background-fact-row.verified,
.background-fact-row.public-backed {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-fact-row.derived-signal {
  border-left-color: #d97706;
  background: #fff8eb;
}

.background-fact-row.needs-source,
.background-fact-row.missing,
.background-fact-row.unconfirmed,
.background-fact-row.needs-research,
.background-fact-row.research-needed {
  border-left-color: #f8a61b;
  background: #fffdf7;
}

.background-fact-row.withheld,
.background-fact-row.redacted,
.background-fact-row.private {
  border-left-color: #9aa6b2;
  background: #fbfcfd;
}

.background-fact-row.cannot-claim,
.background-fact-row.rejected,
.background-fact-row.unsupported {
  border-left-color: #d94a38;
  background: #fff8f6;
}

.background-fact-row span,
.background-fact-row strong,
.background-fact-row em {
  min-width: 0;
  line-height: 1.4;
}

.background-fact-row span {
  letter-spacing: 0;
}

.background-fact-row strong {
  font-size: 13px;
}

.background-fact-row em {
  color: #526477;
}

.background-evidence-quote {
  display: inline-block;
  margin: 3px 0 2px;
  color: #22374d;
  font-weight: 800;
  line-height: 1.35;
}

.background-status-chip,
.background-confidence-chip,
.background-evidence-ref,
.background-source-ref,
.background-source-meta span,
.background-fact-row :is(.status-chip, .confidence-chip, .evidence-ref),
.background-dossier-grid :is(.status-chip, .confidence-chip, .evidence-ref) {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  border: 1px solid #c8d8e6;
  border-radius: 999px;
  background: #fff;
  color: #40566f;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.background-status-chip.confirmed,
.background-status-chip.source-backed,
.background-confidence-chip.high,
.background-confidence-chip.validated {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}

.background-status-chip.missing,
.background-status-chip.needs-research,
.background-status-chip.unconfirmed,
.background-confidence-chip.medium {
  border-color: #f0cf91;
  background: #fff8e8;
  color: #7a4c00;
}

.background-status-chip.cannot-claim,
.background-status-chip.rejected,
.background-confidence-chip.low {
  border-color: #efc9c9;
  background: #fff8f8;
  color: #9b2c20;
}

.background-intelligence-matrix-card {
  border-left-color: #2f80aa;
}

.background-matrix-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.background-matrix-head h3 {
  margin: 3px 0 5px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}

.background-matrix-head p {
  margin: 0;
  color: #526477;
}

.background-matrix-head > strong {
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 48px;
  border: 1px solid #b9d5e8;
  border-radius: 8px;
  background: #eef7fc;
  color: #124467;
  font-size: 20px;
  line-height: 1;
}

.background-intelligence-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.background-intelligence-matrix article {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(52px, auto) auto auto;
  gap: 8px;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #c7d4df;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.background-intelligence-matrix article.confirmed {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-intelligence-matrix article.derived {
  border-left-color: #d97706;
  background: #fff8eb;
}

.background-intelligence-matrix article.missing {
  border-left-color: #d94a38;
  background: #fff8f6;
}

.background-intelligence-matrix article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.background-intelligence-matrix strong,
.background-intelligence-matrix p,
.background-intelligence-matrix em,
.background-intelligence-matrix small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.background-intelligence-matrix strong {
  color: var(--navy);
  line-height: 1.35;
}

.background-intelligence-matrix span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d4dce5;
  border-radius: 999px;
  background: #f7f9fc;
  padding: 2px 7px;
  color: #40566f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.background-intelligence-matrix article.confirmed span {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}

.background-intelligence-matrix article.derived span {
  border-color: #f0cf91;
  background: #fff8e8;
  color: #7a4c00;
}

.background-intelligence-matrix article.missing span {
  border-color: #efc9c9;
  background: #fff8f8;
  color: #9b2c20;
}

.background-intelligence-matrix p {
  margin: 0;
  color: #22374d;
  line-height: 1.45;
}

.background-intelligence-matrix em {
  color: #617386;
  font-size: 12px;
  line-height: 1.4;
}

.background-intelligence-matrix small {
  color: #526477;
  font-size: 11px;
  line-height: 1.35;
}

.background-intelligence-matrix a {
  color: var(--navy);
  font-weight: 900;
}

.background-evidence-lanes {
  align-items: stretch;
}

.background-evidence-lane {
  min-width: 0;
  border-color: #dbe8f1;
  border-radius: 6px;
  background: #fff;
}

.background-evidence-lane > div {
  align-items: flex-start;
  flex-wrap: wrap;
}

.background-evidence-lane strong {
  min-width: 0;
  line-height: 1.35;
}

.background-evidence-lane span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d4dce5;
  border-radius: 999px;
  background: #f7f9fc;
  padding: 2px 7px;
  color: #526174;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.background-evidence-lane.source-backed span {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}

.background-evidence-lane.missing span {
  border-color: #f0cf91;
  background: #fff8e8;
  color: #7a4c00;
}

.background-evidence-lane ul {
  display: grid;
  gap: 5px;
}

.background-evidence-lane li {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.background-dossier-grid {
  align-items: start;
}

.background-dossier-grid article {
  min-width: 0;
  border-color: #dbe8f1;
  border-left: 4px solid #7fa6c6;
  border-radius: 6px;
  background: #fff;
  padding: 10px 11px;
}

.background-evidence-only-note {
  border: 1px solid #f0cf91;
  border-radius: 6px;
  background: #fff8e8;
  padding: 9px 10px;
  color: #7a4c00;
  font-weight: 800;
  line-height: 1.45;
}

.background-dossier-grid article.source-backed,
.background-dossier-grid article.confirmed,
.background-dossier-grid article.confirmed-fact,
.background-dossier-grid article.public-backed {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-dossier-grid article.public-evidence,
.background-dossier-grid article.evidence-summary,
.background-dossier-grid article.evidence-ref {
  border-left-color: #2f80aa;
}

.background-dossier-grid article.missing,
.background-dossier-grid article.needs-research,
.background-dossier-grid article.recommended-next-research,
.background-dossier-grid article.next-research,
.background-dossier-grid article.research-gap {
  border-left-color: #f8a61b;
  background: #fffdf7;
}

.background-dossier-grid article.dossier-warning,
.background-dossier-grid article.cannot-claim,
.background-dossier-grid article.cannot-claim-warning,
.background-dossier-grid article.unsupported {
  border-color: #efc9c9;
  border-left-color: #d94a38;
  background: #fff8f6;
}

.background-dossier-grid strong {
  line-height: 1.35;
}

.background-dossier-grid span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #9ed8c6;
  border-radius: 999px;
  background: #eefbf6;
  padding: 2px 7px;
  color: #14644d;
  line-height: 1.25;
  text-transform: none;
  white-space: normal;
}

.background-dossier-grid article.dossier-warning span,
.background-dossier-grid article.cannot-claim span,
.background-dossier-grid article.cannot-claim-warning span,
.background-dossier-grid article.unsupported span {
  border-color: #efc9c9;
  background: #fff8f8;
  color: #9b2c20;
}

.background-dossier-grid p,
.background-dossier-grid a,
.background-dossier-grid code {
  overflow-wrap: anywhere;
}

.background-deep-gaps-card,
.background-next-research-card,
.background-research-gaps-card,
.background-recommended-next-research {
  border-left-color: #f8a61b;
}

.background-deep-gaps-card ul,
.background-next-research-card ul,
.background-research-gaps-card ul,
.background-recommended-next-research ul {
  gap: 8px;
}

.background-deep-gaps-card li,
.background-next-research-card li,
.background-research-gaps-card li,
.background-recommended-next-research li {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-deep-gaps-card p,
.background-recommended-next-research p {
  border-top: 1px solid #f1d8a5;
  padding-top: 10px;
}

.background-gap-item {
  min-width: 0;
  border-left: 4px solid #f8a61b;
  background: #fff;
}

.background-gap-item strong,
.background-gap-item span,
.background-gap-item p {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.background-gap-item span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #f0cf91;
  border-radius: 999px;
  background: #fff8e8;
  color: #7a4c00;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
}

.background-evidence {
  min-width: 0;
  border-radius: 6px;
  background: #fff;
}

.background-evidence.accepted,
.background-evidence.confirmed,
.background-evidence.source-backed {
  border-left: 4px solid #1f9d7a;
  background: #fbfffd;
}

.background-evidence.rejected,
.background-evidence.cannot-claim,
.background-evidence.unsupported {
  border-color: #efc9c9;
  border-left: 4px solid #d94a38;
  background: #fff8f8;
}

.background-evidence a {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.background-evidence p,
.background-evidence .background-source-reason,
.background-source-meta {
  overflow-wrap: anywhere;
}

.background-source-meta {
  align-items: flex-start;
}

.background-source-utility {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin: 6px 0;
}

.background-source-utility strong,
.background-source-utility span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d4dce5;
  border-radius: 999px;
  background: #f7f9fc;
  padding: 2px 7px;
  color: #40566f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.background-source-utility.substantive strong {
  border-color: #9ed8c6;
  background: #eefbf6;
  color: #14644d;
}

.background-source-utility.identity-only strong {
  border-color: #f0cf91;
  background: #fff8e8;
  color: #7a4c00;
}

.background-warning,
.background-score-card strong,
.background-mini-grid strong {
  overflow-wrap: anywhere;
}

.background-analyst-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.background-analyst-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .36fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #d5e2ec;
  border-left: 4px solid #2f80aa;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.background-analyst-ready .background-analyst-hero {
  border-left-color: #1f9d7a;
}

.background-analyst-usable .background-analyst-hero {
  border-left-color: #d97706;
}

.background-analyst-shallow .background-analyst-hero,
.background-analyst-blocked .background-analyst-hero {
  border-left-color: #d94a38;
}

.background-analyst-hero h3 {
  margin: 3px 0 8px;
  color: #0b2545;
  font-size: 27px;
  line-height: 1.16;
}

.background-analyst-hero p {
  max-width: 980px;
  margin: 0;
  color: #4d6075;
  font-size: 14px;
  line-height: 1.55;
}

.background-analyst-hero aside {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
}

.background-analyst-hero aside span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #b9d7e9;
  border-radius: 999px;
  background: #fff;
  color: #174d72;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.background-analyst-ready .background-analyst-hero aside span {
  border-color: #9ed8c6;
  color: #14644d;
}

.background-analyst-shallow .background-analyst-hero aside span,
.background-analyst-blocked .background-analyst-hero aside span {
  border-color: #efc9c9;
  color: #9b2c20;
}

.background-analyst-hero aside strong {
  color: #17314e;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-analyst-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.background-analyst-kpis article {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.background-analyst-kpis span,
.background-analyst-kpis em {
  color: #61748a;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.background-analyst-kpis strong {
  color: #0b2545;
  font-size: 23px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.background-deep-job {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid #d7e5ef;
  border-left: 4px solid #2f80aa;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 10px 12px;
}

.background-deep-job.running,
.background-deep-job.queued {
  border-left-color: #d97706;
  background: #fffaf2;
}

.background-deep-job.completed {
  border-left-color: #1f9d7a;
  background: #f5fffb;
}

.background-deep-job.failed,
.background-deep-job.blocked {
  border-left-color: #d94a38;
  background: #fff8f7;
}

.background-deep-job div {
  display: grid;
  gap: 2px;
}

.background-deep-job strong {
  color: #102b4a;
  font-size: 15px;
}

.background-deep-job p,
.background-deep-job small {
  margin: 0;
  color: #40566f;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.background-deep-job small {
  justify-self: end;
  color: #718399;
  font-size: 12px;
}

.background-what-we-know-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #cddfec;
  border-left: 4px solid #0f6f6d;
  border-radius: 8px;
  background: #fbfefd;
  padding: 14px;
}

.background-what-we-know-panel h4 {
  margin: 0;
  color: #102b4a;
  font-size: 17px;
  line-height: 1.25;
}

.background-what-we-know-brief {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.background-what-we-know-brief span {
  color: #60748a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.background-what-we-know-brief p {
  max-width: 1180px;
  margin: 0;
  color: #263f5a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-what-we-know-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.background-deployment-intel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #cddfec;
  border-left: 4px solid #2f80aa;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
}

.background-deployment-intel.no-signal {
  border-color: #d8e1ea;
  border-left-color: #7b8794;
  background: #fafbfc;
}

.background-deployment-intel.no-signal .background-deployment-head strong {
  border-color: #cbd5df;
  color: #596b7d;
}

.background-deployment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.background-deployment-head h4 {
  margin: 2px 0 6px;
  color: #102b4a;
  font-size: 18px;
  line-height: 1.25;
}

.background-deployment-head p {
  max-width: 1200px;
  margin: 0;
  color: #334c67;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-deployment-head strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #b9d7e9;
  border-radius: 999px;
  background: #fff;
  color: #174d72;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.background-deployment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.background-deployment-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #2f80aa;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.background-deployment-grid div.risk {
  border-left-color: #d97706;
  background: #fffdf7;
}

.background-deployment-grid div.recommend {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-deployment-grid div.questions {
  border-left-color: #805ad5;
  background: #fbf9ff;
}

.background-deployment-grid div.basis {
  border-left-color: #7b8794;
  background: #fafbfc;
}

.background-deployment-grid span {
  color: #60748a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.background-deployment-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 17px;
}

.background-deployment-grid li {
  color: #40566f;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.background-profile-prefill-intel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #cbdfea;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #f8fdfb;
  padding: 14px;
}

.background-profile-prefill-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.background-profile-prefill-head h3 {
  margin: 2px 0 6px;
  color: #102b4a;
  font-size: 20px;
  line-height: 1.2;
}

.background-profile-prefill-head p {
  max-width: 1180px;
  margin: 0;
  color: #324c67;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-profile-prefill-head aside {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 110px;
}

.background-profile-prefill-head aside span,
.background-profile-prefill-head aside strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #b8dccf;
  border-radius: 999px;
  background: #fff;
  color: #0f5d52;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.background-profile-prefill-head aside strong {
  border-color: #9ed5bd;
  background: #eefbf5;
  font-size: 14px;
}

.background-profile-prefill-grid,
.background-profile-prefill-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.background-profile-prefill-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.background-profile-prefill-grid article,
.background-profile-prefill-action-grid article,
.background-profile-prefill-columns section {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.background-profile-prefill-grid article.product {
  border-left-color: #2f80aa;
}

.background-profile-prefill-grid article.sales {
  border-left-color: #7c3aed;
}

.background-profile-prefill-action-grid article.ask {
  border-left-color: #7c3aed;
  background: #fbf9ff;
}

.background-profile-prefill-action-grid article.quote {
  border-left-color: #d97706;
  background: #fffaf2;
}

.background-profile-prefill-action-grid article.invoice {
  border-left-color: #dc3f31;
  background: #fff8f7;
}

.background-profile-prefill-action-grid article.materials {
  border-left-color: #2f80aa;
  background: #f8fbfd;
}

.background-profile-prefill-grid h4,
.background-profile-prefill-action-grid h4,
.background-profile-prefill-columns h4 {
  margin: 0;
  color: #102b4a;
  font-size: 15px;
  line-height: 1.25;
}

.background-profile-prefill-grid div,
.background-prefill-field-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.background-profile-prefill-grid span,
.background-prefill-field-list span {
  color: #60748a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.background-profile-prefill-grid strong,
.background-prefill-field-list strong {
  color: #263f5a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.background-profile-prefill-columns {
  display: grid;
  grid-template-columns: minmax(240px, .62fr) minmax(340px, 1.38fr);
  gap: 10px;
  min-width: 0;
}

.background-prefill-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.background-prefill-field-list.compact {
  grid-template-columns: 1fr;
}

.background-prefill-field-list div {
  border: 1px solid #e2ecf4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 8px;
}

.background-profile-prefill-action-grid ul {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 170px;
  margin: 0;
  overflow: auto;
  padding-left: 17px;
  scrollbar-width: thin;
}

.background-profile-prefill-action-grid li {
  color: #40566f;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.background-profile-five-section {
  background: #f8fffc;
}

.background-profile-five-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.background-profile-five-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.background-profile-five-grid article.identity {
  border-left-color: #0f766e;
}

.background-profile-five-grid article.cgch {
  border-left-color: #2f80aa;
}

.background-profile-five-grid article.sell {
  border-left-color: #7c3aed;
}

.background-profile-five-grid article.prefill {
  border-left-color: #1f9d7a;
}

.background-profile-five-grid article.blockers {
  border-left-color: #d97706;
  background: #fffaf2;
}

.background-profile-five-grid article.sell,
.background-profile-five-grid article.blockers {
  grid-column: 1 / -1;
}

.background-profile-five-grid h4 {
  margin: 0;
  color: #102b4a;
  font-size: 16px;
  line-height: 1.25;
}

.background-profile-five-grid .background-prefill-field-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.background-profile-five-grid article.sell .background-prefill-field-list,
.background-profile-five-grid article.blockers .background-prefill-field-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.background-profile-source-note {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #f7fbff;
  padding: 9px;
}

.background-profile-source-note p,
.background-profile-source-note small {
  margin: 0;
  color: #40566f;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-profile-source-note small {
  color: #60748a;
  font-weight: 750;
}

.background-analyst-decision-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(250px, .78fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.background-analyst-decision-grid.sources-only {
  grid-template-columns: minmax(0, 1fr);
}

.background-analyst-decision-grid section {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid #dbe8f1;
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.background-analyst-decision-grid section.risk {
  border-left: 4px solid #d94a38;
  background: #fff8f7;
}

.background-analyst-decision-grid section.next {
  border-left: 4px solid #d97706;
  background: #fffaf2;
}

.background-analyst-decision-grid section.sources {
  border-left: 4px solid #2f80aa;
}

.background-analyst-decision-grid h4,
.background-analyst-section h3 {
  margin: 0;
  color: #102b4a;
  line-height: 1.3;
}

.background-analyst-decision-grid div,
.background-what-we-know-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #e4edf5;
  border-left: 4px solid #1f9d7a;
  border-radius: 7px;
  background: #fbfffd;
  padding: 8px;
}

.background-analyst-decision-grid .background-scroll-list,
.background-brief-grid .background-scroll-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 4px 0 0;
}

.background-brief-grid ul.background-scroll-list {
  margin: 0;
  padding-left: 18px;
}

.background-analyst-decision-grid section.sources {
  max-height: 350px;
}

.background-analyst-decision-grid div.missing,
.background-what-we-know-grid div.missing {
  border-left-color: #f8a61b;
  background: #fffdf7;
}

.background-analyst-decision-grid span,
.background-what-we-know-grid span {
  color: #60748a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.background-analyst-decision-grid p,
.background-analyst-decision-grid li,
.background-analyst-decision-grid a,
.background-analyst-decision-grid small,
.background-what-we-know-grid p {
  color: #40566f;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.background-analyst-decision-grid p,
.background-what-we-know-grid p {
  margin: 0;
}

.background-analyst-decision-grid ul,
.background-analyst-decision-grid ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.background-analyst-decision-grid a {
  display: grid;
  gap: 3px;
  border: 1px solid #e4edf5;
  border-radius: 7px;
  background: #f8fbfd;
  padding: 8px;
  text-decoration: none;
}

.background-analyst-decision-grid a:hover,
.background-analyst-decision-grid a:focus-visible {
  border-color: #8eb9d7;
  background: #eef6fc;
}

.background-analyst-decision-grid a strong {
  color: #0f3457;
}

.background-analyst-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d5e2ec;
  border-radius: 8px;
  background: #fff;
  padding: 15px;
}

.background-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.background-section-head strong {
  display: grid;
  place-items: center;
  min-width: 70px;
  min-height: 42px;
  border: 1px solid #b9d5e8;
  border-radius: 8px;
  background: #eef7fc;
  color: #124467;
  font-size: 19px;
}

.background-intel-field-table,
.background-source-extraction-table {
  display: grid;
  gap: 8px;
}

.background-source-extraction-table {
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.background-intel-field-table article,
.background-source-extraction-table article {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #e0eaf2;
  border-left: 4px solid #c1cfdd;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.background-intel-field-table article.confirmed,
.background-source-extraction-table article.useful {
  border-left-color: #1f9d7a;
  background: #fbfffd;
}

.background-intel-field-table article.supported {
  border-left-color: #d97706;
  background: #fffaf2;
}

.background-intel-field-table article.missing,
.background-source-extraction-table article.identity {
  border-left-color: #f8a61b;
  background: #fffdf7;
}

.background-intel-field-table article > div,
.background-source-extraction-table article > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.background-intel-field-table strong,
.background-source-extraction-table strong {
  color: #122d4c;
  line-height: 1.35;
}

.background-intel-field-table span,
.background-source-extraction-table span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d4dce5;
  border-radius: 999px;
  background: #f7f9fc;
  color: #40566f;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.background-intel-field-table p,
.background-intel-field-table small,
.background-source-extraction-table p,
.background-source-extraction-table small,
.background-source-extraction-table a {
  color: #40566f;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.background-intel-field-table p,
.background-source-extraction-table p {
  margin: 0;
}

.background-source-extraction-table .background-source-finding {
  color: #203a56;
  font-weight: 700;
}

.background-source-fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.background-intel-field-table small,
.background-source-extraction-table small {
  color: #60748a;
  font-size: 12px;
}

.background-source-extraction-table a {
  color: #0f3457;
  font-weight: 900;
  text-decoration: none;
}

.background-source-extraction-table a:hover,
.background-source-extraction-table a:focus-visible {
  text-decoration: underline;
}

.background-strategic-intel {
  display: grid;
  gap: 13px;
  min-width: 0;
  border: 1px solid #bcd3e5;
  border-left: 4px solid #0f6f6d;
  border-radius: 8px;
  background: #f8fcfb;
  padding: 15px;
}

.background-strategic-intel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.background-strategic-intel-head h3 {
  margin: 2px 0 6px;
  color: #0b2747;
  font-size: 22px;
  line-height: 1.12;
}

.background-strategic-intel-head p {
  max-width: 1040px;
  margin: 0;
  color: #2c4965;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.background-strategic-intel-head aside {
  display: grid;
  gap: 5px;
  justify-items: end;
  min-width: 120px;
}

.background-strategic-intel-head aside span {
  border: 1px solid #bcd3e5;
  border-radius: 999px;
  background: #fff;
  color: #17486b;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.background-strategic-intel-head aside strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  border: 1px solid #93c5b6;
  border-radius: 8px;
  background: #ecfaf3;
  color: #0f513d;
  font-size: 19px;
}

.background-strategic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.background-strategic-grid article {
  min-width: 0;
  border: 1px solid #d9e7ef;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.background-strategic-grid article.risk {
  border-color: #f0c7bf;
  background: #fffafa;
}

.background-strategic-grid h4 {
  margin: 0 0 8px;
  color: #102b4a;
  font-size: 14px;
}

.background-strategic-grid ul {
  display: grid;
  gap: 7px;
  max-height: 210px;
  margin: 0;
  padding-left: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.background-strategic-grid li,
.background-strategic-grid span,
.background-strategic-grid a {
  color: #3d536b;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.background-strategic-grid a {
  color: #0f4e78;
  font-weight: 900;
  text-decoration: none;
}

.background-strategic-grid a:hover,
.background-strategic-grid a:focus-visible {
  text-decoration: underline;
}

.background-strategic-grid li > span {
  display: block;
  margin-top: 3px;
}

@media (max-width: 760px) {
  .background-report-toolbar,
  .background-hero-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .background-readiness-checks {
    grid-template-columns: 1fr;
  }

  .background-fact-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }

  .background-card:is(.background-fact-table-card, .background-evidence-lanes-card, .background-dossier-card, .background-deep-gaps-card, .background-next-research-card, .background-research-gaps-card, .background-source-dossier),
  .background-hero,
  .background-analyst-readiness,
  .background-analyst-hero,
  .background-analyst-section {
    padding: 12px;
  }

  .background-analyst-hero,
  .background-analyst-decision-grid,
  .background-deep-job,
  .background-deployment-head,
  .background-deployment-grid,
  .background-profile-prefill-head,
  .background-profile-prefill-grid,
  .background-profile-prefill-columns,
  .background-profile-prefill-action-grid,
  .background-profile-five-grid,
  .background-profile-five-grid article.sell,
  .background-profile-five-grid article.blockers,
  .background-profile-five-grid .background-prefill-field-list,
  .background-prefill-field-list,
  .background-what-we-know-grid {
    grid-template-columns: 1fr;
  }

  .background-profile-five-grid article.sell,
  .background-profile-five-grid article.blockers {
    grid-column: auto;
  }

  .background-deep-job small {
    justify-self: start;
  }

  .background-strategic-intel {
    padding: 12px;
  }

  .background-strategic-intel-head,
  .background-strategic-grid {
    grid-template-columns: 1fr;
  }

  .background-strategic-intel-head aside {
    justify-items: start;
  }

  .background-profile-prefill-head aside {
    justify-items: start;
  }

  .background-analyst-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .background-source-meta {
    gap: 5px;
  }
}
