:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f8;
  color: #172024;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d9e0e3;
  display: flex;
  gap: 24px;
  min-height: 60px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  color: #172024;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  border-radius: 6px;
  color: #46545a;
  padding: 8px 10px;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  background: #e8f1ee;
  color: #123c32;
}

.company-lookup {
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
}

.company-lookup-trigger {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #46545a;
  font-size: 14px;
  font-weight: 700;
  min-height: 0;
  padding: 8px 10px;
}

.company-lookup-trigger:hover,
.company-lookup-trigger[aria-expanded="true"] {
  background: #e8f1ee;
  border-color: #c5dfd8;
  color: #123c32;
}

.company-lookup-label {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.company-lookup input {
  background: #f9fbfb;
  border-color: #cbd8d8;
  min-height: 36px;
  padding: 7px 10px;
}

.company-lookup input:focus {
  background: #ffffff;
  border-color: #4f9688;
  outline: 2px solid rgba(79, 150, 136, 0.18);
  outline-offset: 1px;
}

.company-lookup-panel {
  background: #ffffff;
  border: 1px solid #cbd8d8;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 32, 36, 0.16);
  left: 0;
  margin-top: 6px;
  min-width: 320px;
  padding: 8px;
  position: absolute;
  top: 100%;
  z-index: 4;
}

.company-lookup-results {
  max-height: min(360px, calc(100vh - 150px));
  overflow-y: auto;
}

.company-lookup-status {
  color: #657278;
  font-size: 12px;
  margin: 5px 7px 7px;
}

.company-lookup-option {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #172024;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: space-between;
  min-height: 0;
  padding: 9px 8px;
  text-align: left;
  width: 100%;
}

.company-lookup-option:hover,
.company-lookup-option.is-active {
  background: #e8f1ee;
}

.company-lookup-option strong {
  font-size: 13px;
  line-height: 1.25;
}

.company-lookup-option span {
  color: #657278;
  font-size: 12px;
  line-height: 1.25;
}

.company-lookup-option-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.company-lookup-open {
  background: #ffffff;
  border: 1px solid #b9d9d1;
  border-radius: 999px;
  color: #0b5d4f;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 10px;
  padding: 6px 8px;
  text-decoration: none;
  white-space: nowrap;
}

.company-lookup-open:hover,
.company-lookup-open:focus-visible {
  background: #dff1ec;
  border-color: #0f6d5b;
  color: #083c34;
}

.seller-switcher {
  margin-left: auto;
}

.seller-switcher label {
  align-items: center;
  flex-direction: row;
  font-size: 12px;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.seller-switcher select {
  min-height: 34px;
  min-width: 180px;
  padding: 6px 30px 6px 10px;
}

.shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 24px;
}

.section-head {
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
}

.section-head p,
.result-card p {
  color: #657278;
}

.grid-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  color: #344248;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 650;
  gap: 7px;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  border: 1px solid #cbd4d8;
  border-radius: 6px;
  color: #172024;
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.query-leads-form textarea {
  min-height: 170px;
}

.graph-agent-hero {
  align-items: flex-end;
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 26px;
}

.graph-agent-hero h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.graph-agent-hero p {
  color: #526167;
  line-height: 1.55;
  max-width: 760px;
}

.eyebrow {
  color: #176b55;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.agent-stat-strip {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.agent-stat-strip span {
  background: #edf3f1;
  border: 1px solid #d6e2df;
  border-radius: 999px;
  color: #123c32;
  font-size: 13px;
  font-weight: 750;
  padding: 7px 10px;
}

.graph-agent-panel {
  padding: 0;
}

.graph-agent-form {
  display: grid;
  gap: 0;
}

.agent-query {
  padding: 22px 22px 16px;
}

.agent-query textarea {
  min-height: 150px;
}

.query-chat-box {
  background: #fbfcfc;
}

.query-chat-box span {
  color: #263238;
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.agent-filter-bar {
  background: #f7faf9;
  border-top: 1px solid #e1e7ea;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 18px 22px;
}

.graph-agent-advanced {
  border-top: 1px solid #e1e7ea;
}

.agent-toggle-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px 22px 20px;
}

.agent-submit-row {
  align-items: center;
  border-top: 1px solid #e1e7ea;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 22px 22px;
}

.agent-examples {
  align-items: center;
  color: #657278;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
}

.agent-examples code {
  background: #f0f4f5;
  border: 1px solid #dce4e7;
  border-radius: 999px;
  color: #344248;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.agent-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.agent-plan-panel .section-head {
  margin-bottom: 14px;
}

.listing-panel {
  overflow: hidden;
}

.listing-table-wrap {
  overflow-x: auto;
}

.listing-pagination {
  margin-top: 12px;
}

.listing-pagination-form {
  align-items: center;
  display: flex;
  gap: 12px;
}

.listing-pagination-status {
  color: #4b5a5f;
  font-size: 13px;
}

.listing-view-switch {
  align-items: center;
  background: #eef3f2;
  border: 1px solid #d9e3e1;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
}

.listing-view-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #526167;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 14px;
}

.listing-view-button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(20, 38, 44, 0.12);
  color: #172024;
}

.listing-view-button:focus-visible,
.graph-node:focus-visible {
  outline: 3px solid rgba(15, 109, 91, 0.28);
  outline-offset: 3px;
}

.listing-export-button {
  background: #176b55;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
}

.listing-export-button:hover,
.listing-export-button:focus-visible {
  background: #124e3f;
}

.listing-table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

.listing-table th,
.listing-table td {
  border-bottom: 1px solid #e1e7ea;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.listing-table th {
  background: #f7faf9;
  color: #526167;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-table td {
  color: #263238;
  font-size: 14px;
}

.listing-sub {
  color: #657278;
  font-size: 12px;
  margin-top: 4px;
}

.listing-evidence {
  background: #eef4f3;
  border: 1px solid #d8e5e1;
  border-radius: 999px;
  color: #23473f;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin: 0 4px 4px 0;
  max-width: 260px;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-graph-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.listing-graph-canvas {
  min-width: 0;
}

.listing-graph-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.listing-graph-toolbar label {
  color: #526167;
  display: grid;
  flex: 1 1 240px;
  font-size: 12px;
  font-weight: 850;
  gap: 5px;
  text-transform: uppercase;
}

.listing-graph-toolbar input {
  background: #ffffff;
  border: 1px solid #cfdadd;
  border-radius: 6px;
  color: #172024;
  font: inherit;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
  text-transform: none;
}

.listing-graph-tool {
  background: #ffffff;
  border: 1px solid #cfdadd;
  border-radius: 6px;
  color: #17343c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 12px;
}

.listing-graph-tool:hover,
.listing-graph-tool:focus-visible {
  border-color: #0f6d5b;
  color: #0f6d5b;
}

.listing-graph-tool.is-active {
  background: #e6f3ef;
  border-color: #0f6d5b;
  color: #0b5547;
}

.listing-graph-tool:disabled {
  cursor: wait;
  opacity: 0.62;
}

.listing-graph-llm {
  background: #17343c;
  border-color: #17343c;
  color: #ffffff;
}

.listing-graph-llm:hover,
.listing-graph-llm:focus-visible {
  background: #0f6d5b;
  color: #ffffff;
}

.listing-graph-count {
  color: #657278;
  font-size: 12px;
  font-weight: 800;
  margin-left: auto;
  padding-bottom: 10px;
}

.listing-graph-stage {
  background:
    linear-gradient(#f4f7f7 1px, transparent 1px),
    linear-gradient(90deg, #f4f7f7 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  min-height: 640px;
  overflow: hidden;
  touch-action: none;
}

.listing-graph-svg {
  cursor: grab;
  display: block;
  height: 660px;
  min-width: 0;
  width: 100%;
}

.listing-graph-svg:active {
  cursor: grabbing;
}

.listing-graph-help {
  color: #657278;
  font-size: 12px;
  font-weight: 750;
  margin-top: 8px;
}

.listing-graph-status {
  color: #0f6d5b;
  font-size: 12px;
  font-weight: 850;
  min-height: 18px;
  margin-top: 4px;
}

.listing-graph-status.is-error {
  color: #a73434;
}

.listing-graph-detail {
  align-self: stretch;
  background: #fbfcfc;
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  color: #344248;
  min-height: 360px;
  padding: 18px;
}

.listing-graph-detail h3 {
  color: #172024;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 6px 0 8px;
}

.listing-graph-detail p {
  color: #657278;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 14px;
}

.graph-detail-kicker {
  color: #0f6d5b;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.graph-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.graph-detail-actions a {
  background: #17343c;
  border: 1px solid #17343c;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 10px;
  text-decoration: none;
}

.graph-detail-actions a + a {
  background: #ffffff;
  color: #17343c;
}

.graph-detail-section {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.graph-detail-section span {
  background: #edf4f2;
  border: 1px solid #d6e5e1;
  border-radius: 999px;
  color: #23473f;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-links line {
  stroke: rgba(82, 97, 103, 0.22);
  stroke-width: 1.2;
}

.graph-links line.is-related {
  stroke: #0f6d5b;
  stroke-width: 2.4;
}

.graph-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.graph-node.is-dimmed {
  opacity: 0.2;
}

.graph-node circle {
  stroke: #ffffff;
  stroke-width: 3;
}

.graph-node text {
  fill: #172024;
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 3px;
}

.graph-evidence-node circle {
  fill: #ffffff;
  stroke: #b8c9ca;
}

.graph-company-node circle {
  fill: #17343c;
}

.graph-node.is-related circle {
  fill: #e4f3ef;
  stroke: #0f6d5b;
  stroke-width: 3;
}

.graph-node:hover circle,
.graph-node.is-selected circle {
  fill: #0f6d5b;
  stroke: #bfe4da;
}

.graph-node.is-search-match circle {
  fill: #8a5a00;
  stroke: #ffe0a3;
}

.graph-node.is-selected text {
  fill: #0f4f43;
  font-weight: 950;
}

.graph-explorer {
  display: grid;
  gap: 18px;
}

.graph-explorer-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.graph-explorer-head h1 {
  color: #172024;
  font-size: 34px;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.graph-explorer-head p {
  color: #657278;
  margin: 0;
}

.graph-explorer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.graph-explorer-stats span {
  background: #eef4f3;
  border: 1px solid #d8e5e1;
  border-radius: 999px;
  color: #23473f;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
}

.graph-filter-panel {
  background: #ffffff;
  border: 1px solid #dfe7e8;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(23, 32, 36, 0.06);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.graph-filter-band {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.graph-filter-label {
  color: #0f6d5b;
  display: block;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.graph-hard-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.graph-filter-panel label,
.graph-explorer-toolbar label {
  color: #526167;
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 5px;
  text-transform: uppercase;
}

.graph-filter-panel input,
.graph-filter-panel select,
.graph-explorer-toolbar input {
  background: #ffffff;
  border: 1px solid #cfdadd;
  border-radius: 6px;
  color: #172024;
  font: inherit;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
  text-transform: none;
}

.graph-filter-panel select.graph-multi-select {
  min-height: 118px;
  padding: 6px;
}

.graph-filter-panel select.graph-multi-select option {
  border-radius: 4px;
  padding: 6px 8px;
}

.graph-filter-row-head,
.graph-filter-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.graph-filter-actions {
  border-top: 1px solid #edf2f3;
  padding-top: 12px;
}

.graph-filter-actions a {
  color: #526167;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.graph-filter-panel button,
.graph-add-filter {
  background: #17343c;
  border: 1px solid #17343c;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 14px;
}

.graph-add-filter {
  background: #ffffff;
  border-color: #cfdadd;
  color: #17343c;
}

.graph-relationship-filter-list {
  display: grid;
  gap: 8px;
}

.graph-relationship-filter {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(130px, 0.55fr) minmax(180px, 1fr) 38px;
}

.graph-relationship-filter select,
.graph-relationship-filter input {
  min-width: 0;
}

.graph-value-picker {
  border: 1px solid #cfdadd;
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  position: relative;
}

.graph-value-selected {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 5px 6px 0;
}

.graph-value-search {
  border: 0 !important;
  min-height: 34px !important;
  padding: 6px 8px !important;
}

.graph-value-placeholder {
  color: #8a989d;
  font-size: 12px;
  font-weight: 700;
  padding-left: 2px;
}

.graph-value-chip {
  align-items: center;
  background: #eef7f5 !important;
  border: 1px solid #c7ded8 !important;
  border-radius: 999px !important;
  color: #17343c !important;
  display: inline-flex;
  gap: 5px;
  max-width: 100%;
  min-height: 24px !important;
  padding: 3px 7px !important;
}

.graph-value-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-value-chip strong {
  font-size: 14px;
  line-height: 1;
}

.graph-value-picker-toggle {
  background: #ffffff !important;
  border: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-left-radius: 0 !important;
  color: #17343c !important;
  min-height: 34px !important;
  padding: 0 !important;
}

.graph-value-add-term {
  background: #eef7f5 !important;
  border: 0 !important;
  border-left: 1px solid #d9e5e7 !important;
  border-radius: 0 !important;
  color: #0f6d5b !important;
  font-size: 18px !important;
  min-height: 34px !important;
  padding: 0 !important;
}

.graph-value-picker:not(.is-enabled) .graph-value-picker-toggle {
  color: #9aa7ac !important;
  cursor: default;
}

.graph-value-picker:not(.is-enabled) .graph-value-add-term {
  color: #9aa7ac !important;
  cursor: default;
}

.graph-value-picker-menu {
  background: #ffffff;
  border: 1px solid #cfdadd;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(23, 32, 36, 0.14);
  left: 0;
  max-height: 260px;
  max-width: min(420px, 90vw);
  min-width: 100%;
  overflow: auto;
  padding: 6px;
  position: absolute;
  top: calc(100% + 5px);
  width: max-content;
  z-index: 40;
}

.graph-value-picker-option-row {
  align-items: stretch;
  display: flex;
  gap: 4px;
}

.graph-value-picker-option {
  align-items: center;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #172024 !important;
  display: flex;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 34px !important;
  min-width: 0;
  padding: 7px 8px !important;
  text-align: left;
}

.graph-value-picker-option:hover,
.graph-value-picker-option:focus {
  background: #eef7f5 !important;
}

.graph-value-picker-option span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-value-picker-option small,
.graph-value-picker-empty {
  color: #6e7d83;
  font-size: 12px;
}

.graph-value-picker-option small {
  flex: 0 0 auto;
  white-space: nowrap;
}

.graph-value-picker-empty {
  padding: 8px;
}

.graph-value-canonical-arrow {
  align-items: center;
  background: #f6faf9 !important;
  border: 1px solid #d9e5e7 !important;
  border-radius: 6px !important;
  color: #4a8a80 !important;
  display: flex !important;
  flex-shrink: 0;
  font-size: 13px !important;
  justify-content: center;
  min-height: 34px !important;
  padding: 0 !important;
  width: 30px;
}

.graph-value-canonical-arrow:hover,
.graph-value-canonical-arrow:focus {
  background: #eef7f5 !important;
  color: #172024 !important;
}

.graph-value-canonical-arrow.is-open {
  transform: rotate(90deg);
}

.graph-value-picker-raw-terms {
  background: #f6faf9;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 4px 6px 20px;
  padding: 4px;
}

.graph-value-picker-raw-terms[hidden] {
  display: none;
}

.graph-value-picker-raw-term {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 5px !important;
  color: #172024 !important;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 28px !important;
  padding: 5px 7px !important;
  text-align: left;
  width: 100%;
}

.graph-value-picker-raw-term:hover,
.graph-value-picker-raw-term:focus {
  background: #eef7f5 !important;
}

.graph-value-picker-raw-term small {
  color: #6e7d83;
  font-size: 11px;
}

.graph-remove-filter {
  background: #ffffff !important;
  border-color: #d8e0e2 !important;
  color: #8a3d3d !important;
  font-size: 18px !important;
  line-height: 1;
  padding: 0 !important;
}

.graph-check {
  align-items: center;
  display: flex !important;
  gap: 6px !important;
  min-height: 38px;
  text-transform: none !important;
}

.graph-check input {
  min-height: auto;
  padding: 0;
}

.graph-explorer-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
}

.graph-explorer-main {
  min-width: 0;
}

.graph-explorer-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.graph-explorer-toolbar > label {
  flex: 1 1 240px;
}

.graph-category-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.graph-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.graph-category-toggles label {
  align-items: center;
  background: #eef3f2;
  border: 1px solid #d9e3e1;
  border-radius: 999px;
  color: #344248;
  display: flex;
  font-size: 12px;
  font-weight: 850;
  gap: 5px;
  min-height: 38px;
  padding: 7px 9px;
  text-transform: none;
}

.company-graph-stage {
  background:
    linear-gradient(#f4f7f7 1px, transparent 1px),
    linear-gradient(90deg, #f4f7f7 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  min-height: 760px;
  overflow: hidden;
  touch-action: none;
}

.company-graph-svg {
  cursor: grab;
  display: block;
  height: 760px;
  width: 100%;
}

.graph-table-view {
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  overflow: hidden;
}

.graph-table-wrap {
  overflow-x: auto;
}

.graph-table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

.graph-table th,
.graph-table td {
  border-bottom: 1px solid #dfe7e8;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.graph-table th {
  background: #f7faf9;
  color: #46545a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.graph-table td {
  color: #172024;
  font-size: 13px;
}

.graph-table tr:last-child td {
  border-bottom: 0;
}

.graph-table tr.is-selected td {
  background: #e8f1ee;
}

.graph-table-relationships {
  min-width: 240px;
}

.graph-view-switch {
  align-items: center;
  background: #eef3f2;
  border: 1px solid #d9e3e1;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
}

.graph-seller-toggle {
  align-items: center;
  color: #344248;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  margin-left: 10px;
  padding: 0 6px;
  user-select: none;
}

.company-graph-detail {
  align-self: stretch;
  background: #fbfcfc;
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  color: #344248;
  min-height: 420px;
  padding: 18px;
}

.company-graph-detail h3 {
  color: #172024;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 6px 0 8px;
}

.company-graph-detail p {
  color: #657278;
  font-size: 14px;
  line-height: 1.45;
}

.graph-category-certification circle {
  fill: #edf7f1;
  stroke: #2e7d55;
}

.graph-category-job circle {
  fill: #fff4dc;
  stroke: #ad7518;
}

.graph-category-news circle {
  fill: #eaf1fb;
  stroke: #416f9f;
}

.graph-category-procurement circle {
  fill: #f4ecfb;
  stroke: #76529a;
}

.graph-category-industry circle {
  fill: #f4f0e8;
  stroke: #756243;
}

.graph-category-technology circle {
  fill: #e7f5f4;
  stroke: #287b78;
}

.graph-category-process circle {
  fill: #eef2ff;
  stroke: #5263a6;
}

.graph-category-capability circle {
  fill: #f1f8f5;
  stroke: #3f8a68;
}

.graph-category-material circle {
  fill: #f6eeee;
  stroke: #954747;
}

.graph-category-offering circle {
  fill: #edf5ea;
  stroke: #5c813e;
}

.graph-category-application circle {
  fill: #eef4f8;
  stroke: #4d7890;
}

.graph-category-buying_signal circle {
  fill: #fff0e8;
  stroke: #a76334;
}

.graph-category-department circle {
  fill: #eaf6ff;
  stroke: #2f76a8;
}

.graph-category-role circle {
  fill: #fff5e6;
  stroke: #b66f1f;
}

.graph-employee-node circle {
  fill: #f1ecff;
  stroke: #7054b8;
}

.graph-category-contact circle {
  fill: #f0f1f2;
  stroke: #68747a;
}

.graph-category-social circle {
  fill: #eef3fb;
  stroke: #3f6fb2;
}

.graph-category-supplier_partnership circle {
  fill: #fff7e8;
  stroke: #9a6a1f;
}

.graph-category-collaboration circle {
  fill: #eef8ef;
  stroke: #4f8a55;
}

.graph-category-sponsorship circle {
  fill: #fff1f4;
  stroke: #af4961;
}

.graph-category-production_location circle {
  fill: #f0f5f7;
  stroke: #55717e;
}

.graph-category-location circle {
  fill: #eef6f8;
  stroke: #4b8090;
}

.graph-category-company_size circle {
  fill: #f7f1fb;
  stroke: #7d5a9f;
}

.graph-category-seller_fit circle {
  fill: #f8eef4;
  stroke: #a04d78;
}

.cypher-details {
  border: 1px solid #d9e0e3;
  border-radius: 6px;
  overflow: hidden;
}

.cypher-details summary {
  color: #344248;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.cypher-details pre {
  background: #172024;
  color: #eff5f3;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.filter-summary {
  display: grid;
  gap: 10px;
}

.filter-chip-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip-label {
  color: #526167;
  font-size: 13px;
  font-weight: 800;
  min-width: 120px;
}

.filter-chip {
  background: #edf3f1;
  border: 1px solid #d6e2df;
  border-radius: 999px;
  color: #123c32;
  font-size: 13px;
  font-weight: 750;
  padding: 6px 10px;
}

.checkline {
  align-items: center;
  flex-direction: row;
  font-weight: 600;
}

.checkline input {
  min-height: auto;
  width: auto;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

button {
  background: #176b55;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 0 18px;
}

button:hover {
  background: #105541;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  border-radius: 6px;
  padding: 10px 12px;
}

.message.success {
  background: #e6f4ed;
  color: #15513f;
}

.message.error {
  background: #fde9e7;
  color: #8a211a;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-card {
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  padding: 16px;
}

.result-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-title h3 {
  margin: 0;
}

.result-name-link {
  color: #123c32;
  text-decoration: none;
}

.result-name-link:hover {
  color: #176b55;
  text-decoration: underline;
}

.result-title .lead-level {
  background: #e8f1ee;
  border-radius: 999px;
  color: #123c32;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.lead-level.high {
  background: #dff3e8;
  color: #12613f;
}

.lead-level.medium {
  background: #fff0cf;
  color: #805500;
}

.lead-level.low {
  background: #edf1f3;
  color: #4d5b61;
}

.pitch {
  background: #f7faf9;
  border-left: 3px solid #176b55;
  padding: 10px 12px;
}

.evidence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.evidence-row span {
  background: #f5f7f8;
  border: 1px solid #dce4e7;
  border-radius: 999px;
  color: #344248;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.company-hero,
.profile-hero {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 26px;
}

.company-hero h1,
.profile-hero h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.company-hero p,
.profile-hero p {
  color: #526167;
  line-height: 1.55;
  max-width: 780px;
}

.back-link {
  color: #176b55;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  background: #edf3f1;
  border: 1px solid #d6e2df;
  border-radius: 999px;
  color: #123c32;
  font-size: 13px;
  font-weight: 750;
  padding: 6px 10px;
}

.hero-actions,
.profile-hero-actions {
  flex: 0 0 auto;
}

.button-link {
  background: #176b55;
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  padding: 11px 16px;
  text-decoration: none;
}

.button-link:hover {
  background: #105541;
}

.detail-overview,
.profile-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.detail-overview article,
.profile-metrics article {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  padding: 16px;
}

.detail-overview span,
.profile-metrics span,
.fact-meta,
.fact-footer,
.muted,
.empty-state {
  color: #657278;
}

.detail-overview span,
.profile-metrics span {
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.detail-overview strong,
.profile-metrics strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.detail-overview p,
.profile-metrics p {
  color: #657278;
  margin-bottom: 0;
}

.profile-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
}

.profile-main,
.profile-side {
  display: grid;
  gap: 18px;
}

.profile-section {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  padding: 20px;
}

.buyer-section {
  border-color: #c9ded8;
}

.profile-section.scrollable {
  display: flex;
  flex-direction: column;
  max-height: 520px;
  min-height: 0;
}

.profile-section.scrollable .profile-section-head {
  flex: 0 0 auto;
}

.profile-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.profile-section.scrollable .profile-card-grid,
.profile-section.scrollable .source-list,
.profile-section.scrollable .evidence-stack {
  align-content: start;
}

.profile-side .profile-section {
  max-height: 360px;
  overflow: hidden;
}

.profile-side .profile-chip-list,
.profile-side .contact-list,
.profile-side .profile-fact-list {
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.profile-section-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-section-head span {
  color: #657278;
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.profile-section-head h2 {
  font-size: 19px;
  margin: 0;
}

.profile-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-summary-grid article {
  background: #f8faf9;
  border: 1px solid #e1e7e9;
  border-radius: 8px;
  padding: 14px;
}

.profile-summary-grid strong,
.profile-fact-list strong {
  color: #172024;
  display: block;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.profile-summary-grid p,
.profile-fact-list p {
  color: #526167;
  line-height: 1.5;
  margin: 0;
}

.evidence-stack {
  display: grid;
  gap: 12px;
}

.evidence-card {
  border: 1px solid #e1e7e9;
  border-radius: 8px;
  padding: 14px;
}

.profile-card-title {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.evidence-card h3 {
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
}

.evidence-card p {
  color: #526167;
  line-height: 1.5;
  margin-bottom: 12px;
}

.evidence-card footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.evidence-card footer,
.evidence-card footer span {
  color: #657278;
  font-size: 12px;
  font-weight: 700;
}

.evidence-card a,
.source-list a,
.profile-fact-list a,
.contact-list a {
  color: #176b55;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.subtle-pill {
  background: #f0f4f5;
  border-radius: 999px;
  color: #526167;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip-list span {
  background: #f3f7f6;
  border: 1px solid #dce6e3;
  border-radius: 999px;
  color: #26353b;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  padding: 7px 10px;
}

.profile-chip-list small {
  color: #657278;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list article {
  border-left: 3px solid #d6e2df;
  padding-left: 13px;
}

.source-list p {
  color: #526167;
  line-height: 1.5;
  margin: 6px 0 0;
}

.profile-source-meta,
.profile-meta-line {
  color: #657278;
  font-size: 12px;
  font-weight: 800;
}

.profile-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.profile-meta-line span {
  background: #f1f5f5;
  border-radius: 999px;
  padding: 4px 8px;
}

.profile-mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-mini-chips span {
  background: #fff7e8;
  border: 1px solid #eadbbd;
  border-radius: 999px;
  color: #6d531c;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list div {
  border: 1px solid #e1e7e9;
  border-radius: 8px;
  padding: 11px;
}

.contact-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contact-list span {
  color: #657278;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.contact-list a {
  display: inline-block;
  font-size: 12px;
  margin-top: 7px;
}

.profile-fact-list {
  display: grid;
  gap: 10px;
}

.profile-fact-list article {
  border: 1px solid #e1e7e9;
  border-radius: 8px;
  padding: 12px;
}

.profile-fact-list span {
  color: #657278;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.profile-kv-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.profile-kv-list div {
  align-items: baseline;
  border-bottom: 1px solid #edf1f2;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.profile-kv-list dt {
  color: #657278;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-kv-list dd {
  color: #172024;
  font-weight: 850;
  margin: 0;
  text-align: right;
}

.empty-state {
  margin-bottom: 0;
}

.detail-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
}

.detail-sidebar {
  display: grid;
  gap: 18px;
}

.detail-section {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: 520px;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 20px;
}

.detail-sidebar .detail-section {
  height: 380px;
}

.detail-section-head {
  align-items: center;
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-section-head h2 {
  margin: 0;
}

.detail-section-head span {
  background: #f0f4f5;
  border-radius: 999px;
  color: #46545a;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 8px;
}

.fact-grid {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.fact-card {
  border: 1px solid #e1e7e9;
  border-radius: 8px;
  padding: 13px;
}

.fact-title {
  font-weight: 850;
  line-height: 1.35;
  margin-bottom: 4px;
}

.fact-meta {
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 8px;
}

.signal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.signal-badge {
  background: #eef3f4;
  border-radius: 999px;
  color: #46545a;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 7px;
  text-transform: uppercase;
}

.signal-badge.high {
  background: #dff2e9;
  color: #15513f;
}

.signal-badge.medium {
  background: #e7f0fb;
  color: #234f7d;
}

.signal-badge.low {
  background: #fff2d8;
  color: #77510d;
}

.signal-badge.noise {
  background: #f2e9e7;
  color: #7f3129;
}

.fact-card p {
  color: #526167;
  line-height: 1.45;
  margin-bottom: 10px;
}

.fact-footer {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: space-between;
}

.fact-footer a,
.evidence-list a {
  color: #176b55;
  font-weight: 800;
}

.evidence-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.evidence-list article {
  border-left: 3px solid #d6e2df;
  padding-left: 12px;
}

.evidence-list p {
  color: #526167;
  line-height: 1.5;
  margin: 6px 0 0;
}

.client-chat-panel {
  background: #ffffff;
  border: 1px solid #cfd9dc;
  border-radius: 8px;
  bottom: 22px;
  box-shadow: 0 14px 40px rgba(23, 32, 36, 0.16);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(620px, calc(100vh - 92px));
  position: fixed;
  right: 22px;
  width: min(420px, calc(100vw - 44px));
  z-index: 3;
}

.client-chat-panel.is-minimized {
  display: block;
  height: auto;
  overflow: visible;
  width: 220px;
}

.client-chat-toggle {
  align-items: center;
  background: #176b55;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  display: none;
  gap: 10px;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}

.client-chat-toggle span {
  font-weight: 850;
}

.client-chat-toggle strong {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 8px;
}

.client-chat-panel.is-minimized .client-chat-toggle {
  display: flex;
}

.client-chat-panel:not(.is-minimized) .client-chat-toggle {
  display: none;
}

.client-chat-panel.is-minimized .client-chat-body {
  display: none;
}

.client-chat-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.client-chat-header {
  align-items: flex-start;
  border-bottom: 1px solid #d9e0e3;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.client-chat-header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.client-chat-header-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.client-chat-header h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.client-chat-header p {
  color: #657278;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 0;
}

.client-chat-header .graph-chat-scope {
  color: #182522;
  font-weight: 700;
  margin-top: 4px;
}

.client-chat-log {
  background: #f7faf9;
  display: grid;
  gap: 10px;
  min-height: 180px;
  overflow: auto;
  padding: 14px;
}

.mini-chat-row {
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  max-width: 92%;
  padding: 10px;
}

.mini-chat-row.from-user {
  background: #e8f1ee;
  justify-self: end;
}

.mini-chat-row.from-assistant {
  background: #ffffff;
}

.mini-chat-author {
  color: #46545a;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.mini-chat-content {
  color: #243137;
  font-size: 13px;
  line-height: 1.45;
}

.mini-chat-content p {
  margin: 0 0 8px;
}

.mini-chat-content p:last-child {
  margin-bottom: 0;
}

.mini-chat-content ul {
  margin: 6px 0 8px 18px;
  padding: 0;
}

.client-chat-form {
  border-top: 1px solid #d9e0e3;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.client-chat-form textarea {
  min-height: 58px;
}

.client-chat-form > div {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 84px minmax(0, 1fr);
}

/* The company coach needs room for both its dialogue and the private, scoped history. */
.company-headhunter-chat {
  max-height: min(680px, calc(100vh - 44px));
  width: min(630px, calc(100vw - 108px));
}

.company-headhunter-chat:not(.is-minimized) {
  grid-template-rows: minmax(0, 1fr);
  height: min(680px, calc(100vh - 44px));
  overflow: hidden;
}

.company-headhunter-chat .client-chat-body {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.company-chat-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.company-chat-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.company-chat-main .client-chat-log {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.company-chat-main .client-chat-log::-webkit-scrollbar {
  width: 11px;
}

.company-chat-main .client-chat-log::-webkit-scrollbar-track {
  background: #e8efed;
}

.company-chat-main .client-chat-log::-webkit-scrollbar-thumb {
  background: #849b94;
  border: 2px solid #e8efed;
  border-radius: 999px;
}

.company-chat-main .client-chat-log::-webkit-scrollbar-thumb:hover {
  background: #5f7971;
}

.company-headhunter-chat .client-chat-minimize {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.company-chat-sidebar {
  background: #f3f7f6;
  border-right: 1px solid #d9e0e3;
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
}

.company-chat-new {
  background: #ffffff;
  border: 1px solid #b8cbc5;
  border-radius: 6px;
  color: #135b49;
  font-weight: 750;
  min-height: 34px;
}

.company-chat-sidebar-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.company-chat-sidebar-empty {
  color: #657278;
  font-size: 12px;
  margin: 6px 2px;
}

.company-chat-history-row {
  align-items: center;
  display: grid;
  gap: 3px;
  grid-template-columns: minmax(0, 1fr) 26px;
}

.company-chat-history-row.is-active .company-chat-history-open {
  background: #dceee8;
  border-color: #91bcae;
  color: #124c3d;
}

.company-chat-history-open,
.company-chat-history-delete {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334348;
  min-height: 32px;
}

.company-chat-history-open {
  overflow: hidden;
  padding: 5px 7px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-chat-history-delete {
  color: #6d5551;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.company-chat-history-open:hover,
.company-chat-history-delete:hover,
.company-chat-new:hover {
  border-color: #91bcae;
}

.company-headhunter-chat.is-history-hidden .company-chat-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.company-headhunter-chat.is-history-hidden .company-chat-sidebar {
  display: none;
}

.client-chat-form button {
  width: 100%;
}

.secondary-button {
  background: #e8eef0;
  color: #243137;
}

.secondary-button:hover {
  background: #d7e1e5;
}

.compact-heading {
  font-size: 16px;
  margin-bottom: -4px;
}

.chat-shell {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100vh - 116px);
  overflow: hidden;
}

.chat-header {
  align-items: center;
  border-bottom: 1px solid #d9e0e3;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.chat-header h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.chat-header p {
  color: #657278;
  margin-bottom: 0;
}

.data-chat-log {
  background: #f7faf9;
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.chat-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  max-width: 880px;
}

.chat-row.from-user {
  flex-direction: row-reverse;
  justify-self: end;
}

.chat-avatar {
  align-items: center;
  background: #dce8e4;
  border: 1px solid #c7d5d1;
  border-radius: 999px;
  color: #123c32;
  display: flex;
  flex: 0 0 34px;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
}

.chat-row.from-user .chat-avatar {
  background: #dce5ec;
  color: #24384a;
}

.chat-bubble {
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  padding: 12px 14px;
}

.chat-bubble.assistant {
  background: #ffffff;
}

.chat-bubble.user {
  background: #e8f1ee;
}

.chat-author {
  color: #46545a;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.chat-content {
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
  word-wrap: break-word;
}

.chat-content p {
  margin: 0 0 12px;
}

.chat-content p:last-child {
  margin-bottom: 0;
}

.chat-content h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 16px 0 8px;
}

.chat-content h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 14px 0 6px;
}

.chat-content ul,
.chat-content ol {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.chat-content li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.chat-content li::marker {
  color: #176b55;
  font-weight: 700;
}

.chat-content a {
  color: #176b55;
  font-weight: 700;
}

.chat-content strong {
  color: #172024;
  font-weight: 800;
}

.citation-pill {
  background: #e8f1ee;
  border: 1px solid #b9ccc5;
  border-radius: 999px;
  color: #176b55;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  margin: 0 2px;
  padding: 3px 6px;
  position: relative;
  vertical-align: 0.08em;
  white-space: nowrap;
}

.citation-pill:hover,
.citation-pill:focus {
  background: #d9ebe5;
  border-color: #176b55;
}

.citation-pill:focus {
  outline: 2px solid #176b55;
  outline-offset: 2px;
}

.citation-pill:hover::after,
.citation-pill:focus::after {
  background: #243137;
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: 0 12px 28px rgba(36, 49, 55, 0.18);
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  left: 50%;
  line-height: 1.35;
  max-width: min(420px, 78vw);
  min-width: 220px;
  padding: 9px 10px;
  position: absolute;
  text-align: left;
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  z-index: 20;
}

.citation-pill:hover::before,
.citation-pill:focus::before {
  border: 6px solid transparent;
  border-top-color: #243137;
  bottom: calc(100% - 4px);
  content: "";
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  z-index: 21;
}

.citation-sources {
  border-top: 1px solid #d9e0e3;
  margin-top: 12px;
  padding-top: 10px;
  white-space: normal;
}

.citation-sources summary {
  color: #46545a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.citation-sources ol {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 22px;
}

.citation-sources li {
  border-radius: 6px;
  color: #46545a;
  font-size: 12px;
  line-height: 1.45;
  padding: 4px 6px;
}

.citation-sources li.is-active-citation {
  background: #e8f1ee;
}

.citation-source-id {
  color: #176b55;
  font-weight: 850;
}

.citation-source-company {
  color: #243137;
  font-weight: 800;
}

.empty-chat {
  align-self: center;
  justify-self: center;
  max-width: 760px;
  text-align: center;
}

.empty-chat h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.empty-chat p {
  color: #657278;
}

.prompt-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  text-align: left;
}

.prompt-grid span {
  background: #ffffff;
  border: 1px solid #d9e0e3;
  border-radius: 8px;
  color: #344248;
  font-size: 13px;
  line-height: 1.4;
  padding: 12px;
}

.data-chat-composer {
  align-items: end;
  border-top: 1px solid #d9e0e3;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  padding: 16px;
}

.data-chat-composer textarea {
  min-height: 68px;
}

.data-chat-composer button {
  min-width: 92px;
}

.topk-control input {
  text-align: center;
}

.meta {
  color: #657278;
  font-size: 13px;
  margin-bottom: 0;
}

pre {
  background: #11191c;
  border-radius: 8px;
  color: #eaf2f0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.error-panel pre {
  background: #2b1513;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .seller-switcher {
    margin-left: 0;
    width: 100%;
  }

  .company-lookup {
    flex-basis: auto;
    width: 100%;
  }

  .company-lookup-trigger {
    text-align: left;
    width: 100%;
  }

  .company-lookup-panel {
    min-width: 0;
    right: 0;
  }

  .seller-switcher label,
  .seller-switcher select {
    width: 100%;
  }

  .shell {
    padding: 18px;
  }

  .grid-form,
  .grid-form.compact {
    grid-template-columns: 1fr;
  }

  .company-hero,
  .profile-hero {
    flex-direction: column;
    padding: 20px;
  }

  .company-hero h1,
  .profile-hero h1 {
    font-size: 25px;
  }

  .detail-overview,
  .detail-layout,
  .profile-metrics,
  .profile-layout,
  .profile-card-grid,
  .profile-summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-section,
  .detail-sidebar .detail-section {
    height: 430px;
  }

  .chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-shell {
    height: calc(100vh - 92px);
  }

  .data-chat-log {
    padding: 16px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .data-chat-composer {
    grid-template-columns: 1fr;
  }

  .data-chat-composer button {
    width: 100%;
  }

  .client-chat-panel {
    bottom: 12px;
    left: 12px;
    max-height: min(560px, calc(100vh - 24px));
    right: 12px;
    width: auto;
  }

  .client-chat-panel.is-minimized {
    left: auto;
    width: min(220px, calc(100vw - 24px));
  }

  .company-headhunter-chat {
    max-height: calc(100vh - 24px);
    width: calc(100vw - 24px);
  }

  .company-chat-workspace {
    grid-template-columns: 165px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .company-chat-workspace {
    grid-template-columns: 138px minmax(0, 1fr);
  }

  .company-headhunter-chat .client-chat-header {
    gap: 8px;
    padding: 10px;
  }

  .company-headhunter-chat .client-chat-header-actions {
    gap: 4px;
  }

}

/* Advanced filters collapsible */
.advanced-filters {
  grid-column: 1 / -1;
  border: 1px solid #d9e0e3;
  border-radius: 6px;
  padding: 0;
}

.advanced-filters > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  color: #344248;
  padding: 10px 14px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.advanced-filters > summary::before {
  content: "▶";
  font-size: 10px;
  transition: transform 0.15s ease;
  color: #657278;
}

.advanced-filters[open] > summary::before {
  transform: rotate(90deg);
}

.advanced-filters > summary:hover {
  background: #f5f7f8;
  border-radius: 6px 6px 0 0;
}

.advanced-filters[open] > summary {
  border-bottom: 1px solid #d9e0e3;
  border-radius: 6px 6px 0 0;
}

.advanced-filters > .grid-form {
  padding: 16px;
}

@media (max-width: 980px) {
  .graph-explorer-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .graph-explorer-stats {
    justify-content: flex-start;
  }

  .graph-filter-band {
    grid-template-columns: 1fr;
  }

  .graph-hard-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graph-explorer-shell {
    grid-template-columns: 1fr;
  }

  .company-graph-detail {
    min-height: 0;
  }

  .listing-graph-shell {
    grid-template-columns: 1fr;
  }

  .listing-graph-detail {
    min-height: 0;
  }

  .listing-view-switch {
    width: 100%;
  }

  .listing-view-button {
    flex: 1;
  }

  .graph-agent-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-stat-strip {
    justify-content: flex-start;
  }

  .agent-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-submit-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .graph-hard-filters,
  .graph-relationship-filter {
    grid-template-columns: 1fr;
  }

  .graph-filter-actions,
  .graph-filter-row-head {
    align-items: stretch;
    flex-direction: column;
  }

  .graph-filter-panel button,
  .graph-filter-actions a {
    width: 100%;
  }

  .agent-filter-bar,
  .agent-toggle-grid {
    grid-template-columns: 1fr;
  }

  .graph-agent-hero,
  .agent-query,
  .agent-filter-bar,
  .agent-toggle-grid,
  .agent-submit-row {
    padding-left: 16px;
    padding-right: 16px;
  }

  .agent-submit-row button {
    width: 100%;
  }
}

/* Modern graph explorer */
.shell:has(.graph-explorer) {
  max-width: 1640px;
}

.graph-explorer {
  gap: 24px;
  margin: 0 auto;
  max-width: 1540px;
}

.graph-explorer-head {
  align-items: center;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 109, 91, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fafb 100%);
  border: 1px solid #dfe8ea;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(23, 32, 36, 0.07);
  padding: 24px;
}

.graph-explorer-head h1 {
  font-size: clamp(31px, 4vw, 48px);
  line-height: 0.98;
  margin-bottom: 10px;
}

.graph-explorer-head p {
  font-size: 16px;
  line-height: 1.35;
  max-width: 720px;
}

.graph-explorer-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  min-width: 310px;
}

.graph-explorer-stats span {
  background: #ffffff;
  border-color: #d9e5e7;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(23, 32, 36, 0.045);
  color: #17343c;
  font-size: 13px;
  padding: 11px 13px;
  text-align: center;
}

.graph-filter-panel {
  border-color: #dce7ea;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 32, 36, 0.08);
  gap: 0;
  overflow: visible;
  padding: 0;
}

.graph-ai-filter-panel {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(23, 52, 60, 0.98), rgba(13, 117, 99, 0.94)),
    #17343c;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(23, 52, 60, 0.18);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.graph-ai-filter-panel .graph-filter-label {
  color: #a9efe2;
  margin-bottom: 8px;
}

.graph-ai-filter-panel label {
  color: #dbecea;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.graph-ai-filter-panel input {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: #172024;
  font: inherit;
  font-size: 15px;
  min-height: 46px;
  padding: 11px 13px;
}

.graph-ai-filter-panel input:focus {
  box-shadow: 0 0 0 4px rgba(169, 239, 226, 0.2);
  outline: none;
}

.graph-ai-filter-panel button {
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 12px;
  color: #17343c;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  min-height: 46px;
  padding: 11px 18px;
  white-space: nowrap;
}

.graph-filter-band {
  gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.86fr);
}

.query-leads-filter-panel .graph-filter-band {
  grid-template-columns: minmax(0, 1fr);
}

.graph-filter-section {
  min-width: 0;
  padding: 20px;
}

.graph-filter-section-hard {
  border-right: 1px solid #edf2f3;
}

.graph-filter-section-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.graph-filter-label {
  color: #0d7563;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin: 0;
}

.graph-filter-hint {
  color: #7c8b91;
  font-size: 12px;
  font-weight: 750;
}

.graph-hard-filters {
  align-items: start;
  gap: 12px;
  grid-template-columns: minmax(240px, 1.25fr) minmax(150px, 0.75fr) minmax(210px, 1fr);
}

.graph-field,
.graph-filter-panel label,
.graph-explorer-toolbar label {
  color: #56656b;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.05em;
  min-width: 0;
  text-transform: uppercase;
}

.graph-field > span,
.graph-explorer-toolbar label > span {
  min-height: 14px;
}

.graph-field-wide {
  grid-column: span 2;
}

.graph-field-limit {
  max-width: 150px;
}

.graph-filter-panel input,
.graph-filter-panel select,
.graph-explorer-toolbar input {
  border-color: #d4dee1;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(23, 32, 36, 0.02);
  min-height: 42px;
  padding: 10px 12px;
}

.graph-filter-panel input:focus,
.graph-filter-panel select:focus,
.graph-explorer-toolbar input:focus,
.graph-multi-control:focus,
.graph-multi-combobox.is-open .graph-multi-control,
.graph-value-picker:focus-within {
  border-color: #0f7a68;
  box-shadow: 0 0 0 4px rgba(15, 122, 104, 0.12);
  outline: none;
}

.graph-multi-combobox {
  position: relative;
}

.graph-multi-control {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 11px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 30px;
  min-height: 42px;
  padding: 5px 6px 5px 10px;
  text-transform: none;
}

.graph-multi-chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.graph-multi-placeholder {
  color: #8b989d;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.graph-multi-combobox.has-values .graph-multi-placeholder {
  display: none;
}

.graph-multi-toggle {
  background: #eef7f5 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #0d7563 !important;
  min-height: 30px !important;
  padding: 0 !important;
  width: 30px;
}

.graph-multi-menu {
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(23, 32, 36, 0.16);
  left: 0;
  min-width: min(360px, 90vw);
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
}

.graph-multi-search {
  border-radius: 10px !important;
  margin-bottom: 7px;
  width: 100%;
}

.graph-multi-options {
  display: grid;
  gap: 3px;
  max-height: 250px;
  overflow: auto;
}

.graph-multi-option {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #243137 !important;
  justify-content: flex-start;
  min-height: 34px !important;
  overflow: hidden;
  padding: 7px 9px !important;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.graph-multi-option:hover,
.graph-multi-option:focus-visible,
.graph-multi-option.is-selected {
  background: #eef7f5 !important;
  color: #0d7563 !important;
}

.graph-filter-row-head {
  margin-bottom: 12px;
}

.graph-add-filter,
.graph-filter-panel button,
.graph-filter-actions button {
  border-radius: 10px;
  min-height: 40px;
}

.graph-add-filter {
  background: #17343c !important;
  border-color: #17343c !important;
  color: #ffffff !important;
}

.graph-relationship-filter-list {
  gap: 9px;
}

.graph-relationship-empty {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 109, 91, 0.06), rgba(65, 111, 159, 0.045)),
    #fbfcfc;
  border: 1px dashed #cbdadd;
  border-radius: 14px;
  color: #68777d;
  display: flex;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  min-height: 86px;
  padding: 14px;
}

.graph-relationship-filter {
  align-items: start;
  background: #f8fbfb;
  border: 1px solid #e2ecee;
  border-radius: 14px;
  gap: 9px;
  grid-template-columns: minmax(150px, 0.9fr) minmax(118px, 0.64fr) minmax(220px, 1.2fr) 36px;
  padding: 10px;
}

.graph-relationship-filter select {
  background-color: #ffffff;
  min-height: 40px;
}

.graph-value-picker {
  background: #ffffff;
  border-color: #d4dee1;
  border-radius: 11px;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  min-width: 0;
  overflow: visible;
}

.graph-value-selected {
  min-height: 0;
  padding: 6px 7px 0;
}

.graph-value-search {
  border-radius: 0 0 0 11px !important;
  font-size: 13px !important;
}

.graph-value-add-term,
.graph-value-picker-toggle {
  min-height: 36px !important;
}

.graph-value-add-term {
  background: #edf7f5 !important;
}

.graph-value-chip {
  background: #eaf6f3 !important;
  border-color: #c5dfd8 !important;
  border-radius: 999px !important;
  color: #0f4f45 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  min-height: 26px !important;
  padding: 4px 8px !important;
  text-transform: none !important;
  width: auto !important;
}

.graph-remove-filter {
  border-radius: 10px !important;
  min-height: 40px !important;
}

.graph-filter-actions {
  background: #fbfcfc;
  border-top-color: #edf2f3;
  border-radius: 0 0 18px 18px;
  padding: 14px 20px;
}

.graph-filter-secondary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.graph-filter-actions a {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 0;
}

.graph-filter-actions button {
  box-shadow: 0 10px 20px rgba(23, 52, 60, 0.18);
  padding-left: 18px;
  padding-right: 18px;
}

.graph-explorer-shell {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
}

.graph-explorer-main,
.company-graph-detail {
  background: #ffffff;
  border: 1px solid #dfe8ea;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(23, 32, 36, 0.055);
}

.graph-explorer-main {
  min-width: 0;
  overflow: hidden;
  padding: 16px;
}

.graph-explorer-toolbar {
  align-items: center;
  margin-bottom: 12px;
}

.graph-explorer-toolbar > label {
  flex: 1 1 360px;
}

.graph-category-actions {
  margin-left: auto;
}

.listing-graph-tool {
  border-radius: 10px;
  min-height: 38px;
}

.graph-category-panel {
  background: #f8fbfb;
  border: 1px solid #e3ecef;
  border-radius: 16px;
  margin-bottom: 14px;
  padding: 12px;
}

.graph-category-panel-head {
  color: #66757a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.graph-category-toggles {
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding: 1px;
}

.graph-category-groups {
  display: grid;
  gap: 12px;
}

.graph-category-group {
  background: #ffffff;
  border: 1px solid #e1eaec;
  border-radius: 14px;
  padding: 10px;
}

.graph-category-group-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.graph-category-group-head .graph-category-actions {
  margin-left: auto;
}

.graph-category-group-head .listing-graph-tool {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.graph-category-group-label {
  color: #596a70;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 0;
  text-transform: uppercase;
}

.graph-category-toggles label {
  background: #ffffff;
  border-color: #d8e3e5;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(23, 32, 36, 0.035);
  color: #435158;
  cursor: pointer;
  font-size: 12px;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.graph-category-toggles label:hover {
  border-color: #94bbb3;
  transform: translateY(-1px);
}

.graph-category-toggles label::before {
  background: #c9d5d8;
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.graph-category-toggles label:has(input:checked) {
  background: #e8f6f2;
  border-color: #a8d4c9;
  color: #123c32;
}

.graph-category-toggles label:has(input:checked)::before {
  background: #0d7563;
  box-shadow: 0 0 0 3px rgba(13, 117, 99, 0.14);
}

.graph-category-toggles input {
  height: 1px;
  margin: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 1px;
}

.company-graph-stage {
  background:
    linear-gradient(#eef3f4 1px, transparent 1px),
    linear-gradient(90deg, #eef3f4 1px, transparent 1px),
    radial-gradient(circle at 30% 18%, rgba(15, 109, 91, 0.06), transparent 34%),
    #ffffff;
  border-color: #dce7ea;
  border-radius: 16px;
  min-height: 680px;
}

.company-graph-svg {
  height: 680px;
}

.graph-node-legend {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dce7ea;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(23, 32, 36, 0.08);
  color: #344248;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  left: 14px;
  padding: 7px 10px;
  pointer-events: none;
  position: absolute;
  top: 14px;
  z-index: 1;
}

.graph-node-legend span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.graph-node-legend-dot {
  border: 2px solid #ffffff;
  border-radius: 999px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.graph-node-legend-dot-seller {
  background: #0b4a3f;
  box-shadow: 0 0 0 2px #ffd166;
}

.graph-node-legend-dot-company {
  background: #17343c;
}

.company-graph-detail {
  align-self: start;
  max-height: calc(100vh - 110px);
  min-height: 520px;
  overflow: auto;
  padding: 22px;
  position: sticky;
  top: 88px;
}

.company-graph-detail h3 {
  font-size: 24px;
  margin-top: 8px;
}

.graph-node text {
  fill: #263238;
  font-size: 11px;
  font-weight: 850;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 4px;
}

.graph-company-node circle {
  fill: #17343c;
  stroke: #ffffff;
  stroke-width: 2.5px;
}

.graph-seller-node circle {
  fill: #0b4a3f;
  stroke: #ffd166;
  stroke-width: 4px;
}

.graph-seller-node text {
  font-size: 13px;
  font-weight: 900;
}

.graph-category-certification circle { fill: #0f766e; }
.graph-category-job circle { fill: #2563eb; }
.graph-category-news circle { fill: #7c3aed; }
.graph-category-procurement circle { fill: #b45309; }
.graph-category-industry circle { fill: #475569; }
.graph-category-technology circle { fill: #0369a1; }
.graph-category-process circle { fill: #15803d; }
.graph-category-capability circle { fill: #64748b; }
.graph-category-material circle { fill: #92400e; }
.graph-category-offering circle { fill: #be123c; }
.graph-category-application circle { fill: #6d28d9; }
.graph-category-buying_signal circle { fill: #dc2626; }
.graph-category-supplier_partnership circle { fill: #4d7c0f; }
.graph-category-collaboration circle { fill: #0891b2; }
.graph-category-sponsorship circle { fill: #c2410c; }
.graph-category-production_location circle,
.graph-category-location circle { fill: #334155; }
.graph-category-company_size circle { fill: #52525b; }
.graph-category-seller_fit circle { fill: #0f766e; }
.graph-category-department circle { fill: #0e7490; }
.graph-category-role circle { fill: #7e22ce; }
.graph-category-employee circle,
.graph-employee-node circle { fill: #be185d; }
.graph-category-social circle { fill: #db2777; }
.graph-category-education circle { fill: #1d4ed8; }
.graph-category-employer circle { fill: #9333ea; }
.graph-category-interest circle { fill: #16a34a; }
.graph-category-activity_topic circle { fill: #ea580c; }
.graph-category-persona circle { fill: #be185d; }
.graph-category-project circle { fill: #0f766e; }
.graph-category-award circle { fill: #ca8a04; }

.graph-links line {
  stroke: #b9c7ca;
  stroke-opacity: 0.58;
}

.graph-links line.graph-seller-link {
  stroke: #0f6d5b;
  stroke-opacity: 0.35;
  stroke-dasharray: 4 3;
}

.graph-node.is-selected circle,
.graph-node.is-related circle {
  stroke: #083c34;
  stroke-width: 3px;
}

.graph-links line.is-related {
  stroke: #0d7563;
  stroke-opacity: 0.9;
  stroke-width: 2px;
}

.graph-links line {
  transition: opacity 0.15s ease;
}

.graph-links line.is-dimmed {
  opacity: 0.15;
}

@media (max-width: 1180px) {
  .graph-filter-band,
  .graph-explorer-shell {
    grid-template-columns: 1fr;
  }

  .graph-filter-section-hard {
    border-bottom: 1px solid #edf2f3;
    border-right: 0;
  }

  .company-graph-detail {
    max-height: none;
    min-height: 0;
    position: static;
  }
}

@media (max-width: 760px) {
  .graph-explorer-head {
    align-items: stretch;
  }

  .graph-ai-filter-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .graph-explorer-stats,
  .graph-hard-filters,
  .graph-relationship-filter {
    grid-template-columns: 1fr;
  }

  .graph-field-wide,
  .graph-field-limit {
    grid-column: auto;
    max-width: none;
  }

  .graph-category-actions,
  .graph-filter-actions {
    margin-left: 0;
  }

  .graph-filter-panel button.graph-value-chip,
  .graph-filter-panel button.graph-multi-option,
  .graph-filter-panel button.graph-value-picker-option,
  .graph-filter-panel button.graph-multi-toggle,
  .graph-filter-panel button.graph-value-add-term,
  .graph-filter-panel button.graph-value-picker-toggle,
  .graph-filter-panel button.graph-remove-filter {
    width: auto;
  }

  .graph-multi-menu {
    min-width: 0;
  }
}

/* Modern Query Leads v2 and Data Chat */
.shell:has(.graph-agent-hero),
.shell:has(.chat-shell) {
  max-width: 1640px;
}

.graph-agent-hero {
  align-items: center;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 109, 91, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fafb 100%);
  border-color: #dfe8ea;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(23, 32, 36, 0.07);
  margin: 0 auto 24px;
  max-width: 1540px;
  padding: 24px;
}

.graph-agent-hero h1 {
  font-size: clamp(31px, 4vw, 48px);
  line-height: 0.98;
  margin-bottom: 10px;
}

.graph-agent-hero p {
  color: #657278;
  font-size: 16px;
  line-height: 1.35;
  max-width: 760px;
}

.agent-stat-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  min-width: 300px;
}

.agent-stat-strip span {
  background: #ffffff;
  border-color: #d9e5e7;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(23, 32, 36, 0.045);
  color: #17343c;
  font-size: 13px;
  padding: 11px 13px;
  text-align: center;
}

.graph-agent-panel,
.agent-plan-panel,
.listing-panel {
  border-color: #dce7ea;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 32, 36, 0.08);
  margin-left: auto;
  margin-right: auto;
  max-width: 1540px;
  overflow: hidden;
}

.graph-agent-form {
  background: #ffffff;
}

.agent-query {
  background:
    linear-gradient(135deg, rgba(23, 52, 60, 0.98), rgba(13, 117, 99, 0.94)),
    #17343c;
  padding: 20px;
}

.query-chat-box span {
  color: #a9efe2;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-query textarea {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(169, 239, 226, 0.08);
  font-size: 16px;
  line-height: 1.45;
  min-height: 124px;
  resize: vertical;
}

.agent-filter-bar,
.agent-toggle-grid {
  background: #fbfcfc;
  gap: 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 20px;
}

.agent-filter-bar label,
.agent-toggle-grid label {
  color: #56656b;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.05em;
  min-width: 0;
  text-transform: uppercase;
}

.agent-filter-bar input,
.agent-filter-bar select,
.agent-toggle-grid input {
  border-color: #d4dee1;
  border-radius: 11px;
  min-height: 42px;
}

.agent-filter-bar input:focus,
.agent-filter-bar select:focus,
.agent-toggle-grid input:focus,
.agent-query textarea:focus {
  border-color: #0f7a68;
  box-shadow: 0 0 0 4px rgba(15, 122, 104, 0.12);
  outline: none;
}

.graph-agent-advanced {
  background: #ffffff;
  border: 0;
  border-top: 1px solid #edf2f3;
  border-radius: 0;
}

.graph-agent-advanced > summary {
  color: #17343c;
  font-weight: 900;
  padding: 16px 20px;
}

.agent-submit-row {
  background: #ffffff;
  border-top-color: #edf2f3;
  padding: 16px 20px 20px;
}

.agent-examples code {
  background: #eef7f5;
  border-color: #c5dfd8;
  color: #0f4f45;
}

.agent-action-buttons button {
  border-radius: 12px;
  min-height: 44px;
  padding-left: 18px;
  padding-right: 18px;
}

.agent-action-buttons button:not(.secondary-button) {
  background: #17343c;
  border-color: #17343c;
  box-shadow: 0 10px 20px rgba(23, 52, 60, 0.18);
}

.agent-plan-panel .section-head,
.listing-panel .section-head {
  background: #fbfcfc;
  border-bottom: 1px solid #edf2f3;
  margin: -24px -24px 18px;
  padding: 20px 24px;
}

.filter-summary {
  gap: 9px;
}

.filter-chip-group {
  align-items: center;
  background: #fbfcfc;
  border: 1px solid #edf2f3;
  border-radius: 12px;
  padding: 10px;
}

.filter-chip {
  background: #ffffff;
  border-color: #d9e5e7;
  border-radius: 999px;
}

.listing-table {
  border-collapse: separate;
  border-spacing: 0;
}

.listing-table th {
  background: #f4f8f8;
  color: #56656b;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.listing-table td,
.listing-table th {
  border-bottom: 1px solid #edf2f3;
  padding: 12px;
}

.listing-evidence {
  background: #eef7f5;
  border-color: #c5dfd8;
  color: #0f4f45;
}

.query-leads-ai-panel,
.query-leads-filter-panel {
  margin: 18px auto 0;
  max-width: 1540px;
}

.query-lead-question-field {
  grid-column: 1 / -1;
}

.query-lead-question-field textarea {
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 12px;
  color: #18252b;
  font: inherit;
  font-weight: 750;
  min-height: 104px;
  padding: 14px;
  resize: vertical;
  width: 100%;
}

.query-lead-question-field textarea:focus {
  border-color: #0f6d5b;
  box-shadow: 0 0 0 4px rgba(15, 109, 91, 0.12);
  outline: none;
}

.query-leads-filter-panel .graph-filter-actions {
  justify-content: flex-end;
}

.query-leads-filter-panel .graph-filter-actions a {
  margin-right: auto;
}

.chat-shell {
  background: #ffffff;
  border-color: #dce7ea;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 32, 36, 0.08);
  height: calc(100vh - 116px);
  margin: 0 auto;
  max-width: 1540px;
}

.chat-header {
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 109, 91, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fafb 100%);
  border-bottom-color: #edf2f3;
  padding: 22px 24px;
}

.chat-header-action {
  align-self: flex-start;
  background: #17343c;
  border: 1px solid #17343c;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.chat-header-action:hover {
  background: #0f6d5b;
  border-color: #0f6d5b;
}

.chat-header h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1;
}

.data-chat-log {
  background:
    linear-gradient(#eef3f4 1px, transparent 1px),
    linear-gradient(90deg, #eef3f4 1px, transparent 1px),
    #f8fbfb;
  background-size: 28px 28px;
  padding: 24px;
}

.chat-row {
  max-width: min(920px, 88%);
}

.chat-avatar {
  background: #17343c;
  border-color: #17343c;
  color: #ffffff;
}

.chat-row.from-user .chat-avatar {
  background: #e8f6f2;
  border-color: #a8d4c9;
  color: #123c32;
}

.chat-bubble {
  border-color: #dce7ea;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(23, 32, 36, 0.06);
  padding: 14px 16px;
}

.chat-bubble.assistant {
  background: #ffffff;
}

.chat-bubble.user {
  background: #e8f6f2;
  border-color: #c5dfd8;
}

.empty-chat {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dce7ea;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(23, 32, 36, 0.07);
  padding: 28px;
}

.empty-chat h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.prompt-grid span {
  border-color: #dce7ea;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(23, 32, 36, 0.045);
}

.data-chat-composer {
  background: #ffffff;
  border-top-color: #edf2f3;
  grid-template-columns: minmax(0, 1fr) 86px auto;
  padding: 18px 20px;
}

.data-chat-composer.without-top-k {
  grid-template-columns: minmax(0, 1fr) auto;
}

.data-chat-composer textarea,
.data-chat-composer input {
  border-color: #d4dee1;
  border-radius: 12px;
}

.data-chat-composer button {
  background: #17343c;
  border-color: #17343c;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(23, 52, 60, 0.18);
  min-height: 44px;
}

.chat-shell-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100vh - 116px);
}

.chat-shell-layout .chat-shell {
  height: 100%;
  margin: 0;
  max-width: none;
  min-width: 0;
}

.chat-sidebar {
  background: #f8fbfb;
  border: 1px solid #dce7ea;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(23, 32, 36, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
}

.chat-sidebar-new {
  background: #17343c;
  border: 1px solid #17343c;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 12px;
  text-align: left;
}

.chat-sidebar-new:hover {
  background: #0f6d5b;
  border-color: #0f6d5b;
}

.chat-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.chat-sidebar-item {
  align-items: center;
  border-radius: 10px;
  display: flex;
  gap: 2px;
}

.chat-sidebar-item:hover,
.chat-sidebar-item.is-active {
  background: #e8f6f2;
}

.chat-sidebar-item-open {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
}

.chat-sidebar-item-title {
  color: #172024;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sidebar-item-time {
  color: #5b6b70;
  font-size: 11px;
}

.chat-sidebar-item-rename,
.chat-sidebar-item-delete {
  background: none;
  border: none;
  border-radius: 8px;
  color: #5b6b70;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  height: 28px;
  width: 28px;
}

.chat-sidebar-item-rename:hover,
.chat-sidebar-item-delete:hover {
  background: #d6ece5;
  color: #0f6d5b;
}

.seller-json-modal {
  inset: 0;
  position: fixed;
  z-index: 60;
}

.seller-json-backdrop {
  background: rgba(15, 24, 28, 0.42);
  inset: 0;
  position: absolute;
}

.seller-json-dialog {
  background: #ffffff;
  border: 1px solid #dce7ea;
  border-radius: 14px;
  box-shadow: 0 26px 80px rgba(15, 24, 28, 0.24);
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto auto;
  left: 50%;
  max-height: min(780px, calc(100vh - 48px));
  max-width: min(980px, calc(100vw - 40px));
  min-height: min(680px, calc(100vh - 48px));
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.seller-json-head,
.seller-json-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
}

.seller-json-head {
  border-bottom: 1px solid #edf2f3;
  justify-content: space-between;
}

.seller-json-head h2 {
  color: #172024;
  font-size: 18px;
  margin: 0;
}

.seller-json-head p {
  color: #5b6b70;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  margin: 4px 0 0;
}

.seller-json-close {
  background: #f4f7f8;
  border: 1px solid #dce7ea;
  border-radius: 8px;
  color: #172024;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  height: 34px;
  width: 34px;
}

.seller-profile-form-editor {
  overflow-y: auto;
  padding: 16px;
}

.seller-profile-form-editor h3 {
  color: #172024;
  font-size: 14px;
  margin: 0 0 10px;
}

.seller-profile-form-editor label {
  color: #31454c;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.seller-profile-form-editor input,
.seller-profile-form-editor textarea,
.seller-profile-form-editor select {
  border: 1px solid #d4dee1;
  border-radius: 8px;
  color: #172024;
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
  width: 100%;
}

.seller-profile-form-editor textarea {
  min-height: 84px;
}

.seller-profile-form-editor .form-group {
  margin-bottom: 14px;
}

.seller-profile-form-editor table {
  border-collapse: collapse;
  width: 100%;
}

.seller-profile-form-editor td,
.seller-profile-form-editor th {
  border-bottom: 1px solid #edf2f3;
  padding: 6px;
  text-align: left;
  vertical-align: top;
}

.seller-profile-form-editor button {
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 8px;
  color: #17343c;
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 9px;
}

.seller-json-library-missing {
  color: #b42318;
  margin: 0;
}

.seller-json-raw {
  border-top: 1px solid #edf2f3;
  padding: 0 16px 12px;
}

.seller-json-raw summary {
  color: #31454c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 0;
}

.seller-json-raw[open] .seller-json-editor {
  display: block;
}

.seller-json-editor {
  border: 0;
  border-radius: 8px;
  color: #172024;
  display: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  height: 190px;
  line-height: 1.48;
  outline: none;
  padding: 12px;
  resize: none;
  width: 100%;
}

.seller-json-footer {
  border-top: 1px solid #edf2f3;
  justify-content: flex-end;
}

.seller-json-status {
  color: #5b6b70;
  font-size: 13px;
  margin-right: auto;
  min-width: 140px;
}

.seller-json-status[data-status="error"] {
  color: #b42318;
}

.seller-json-status[data-status="success"] {
  color: #0f6d5b;
}

.seller-json-footer button {
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
}

.seller-json-footer .secondary-action {
  background: #ffffff;
  border: 1px solid #d4dee1;
  color: #17343c;
}

.seller-json-footer .primary-action {
  background: #17343c;
  border: 1px solid #17343c;
  color: #ffffff;
}

@media (max-width: 900px) {
  .chat-shell-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  /* Same specificity as the unconditional ".chat-shell-layout .chat-shell { height:
     100% }" rule above, so this correctly wins at this breakpoint instead of the plain
     ".chat-shell { height: calc(100vh - 92px) }" mobile rule elsewhere, which loses on
     specificity and never actually applies here. */
  .chat-shell-layout .chat-shell {
    height: calc(100vh - 92px);
  }

  .chat-sidebar {
    max-height: 240px;
  }

  .seller-json-dialog {
    max-height: calc(100vh - 20px);
    max-width: calc(100vw - 20px);
    min-height: calc(100vh - 20px);
  }

  .seller-json-footer {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .seller-json-status {
    min-width: 0;
  }
}

.page-feedback {
  bottom: 18px;
  position: fixed;
  right: 18px;
  z-index: 20;
}

.page-feedback-trigger {
  align-items: center;
  background: #17343c;
  border: 1px solid #17343c;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(23, 52, 60, 0.24);
  color: #ffffff;
  display: flex;
  font-size: 18px;
  font-weight: 850;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.page-feedback-box {
  background: #ffffff;
  border: 1px solid #d8e1e4;
  border-radius: 8px;
  bottom: 54px;
  box-shadow: 0 18px 44px rgba(23, 32, 36, 0.18);
  display: grid;
  gap: 10px;
  padding: 12px;
  position: absolute;
  right: 0;
  width: min(300px, calc(100vw - 36px));
}

.page-feedback-box[hidden] {
  display: none;
}

.page-feedback-head,
.page-feedback-rating {
  align-items: center;
  display: flex;
  gap: 8px;
}

.page-feedback-head {
  justify-content: space-between;
}

.page-feedback-head span {
  color: #263238;
  font-size: 13px;
  font-weight: 800;
}

.page-feedback-head button {
  background: transparent;
  border: 0;
  color: #66767c;
  min-height: 28px;
  padding: 0 6px;
  width: auto;
}

.page-feedback-rating button {
  background: #f2f6f7;
  border: 1px solid #d8e1e4;
  color: #314147;
  flex: 1;
  min-height: 34px;
  padding: 7px 9px;
}

.page-feedback-rating button.is-selected {
  background: #e2f1ed;
  border-color: #a8cbc2;
  color: #123c32;
}

.page-feedback-box textarea {
  min-height: 76px;
}

.page-feedback-box > button[type="submit"] {
  min-height: 36px;
}

.page-feedback-status {
  color: #607076;
  font-size: 12px;
  margin: 0;
}

@media (max-width: 1180px) {
  .agent-filter-bar,
  .agent-toggle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .graph-agent-hero,
  .chat-header {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-stat-strip,
  .agent-filter-bar,
  .agent-toggle-grid,
  .prompt-grid,
  .data-chat-composer {
    grid-template-columns: 1fr;
  }

  .chat-shell {
    height: calc(100vh - 92px);
  }

  .chat-row {
    max-width: 100%;
  }

  .page-feedback {
    bottom: 14px;
    right: 14px;
  }
}

/* Beautiful Search Parameters Section */
.graph-filter-section-search-parameters {
  border-top: 1px solid #edf2f3;
  margin-top: 6px;
  padding-top: 16px;
}

.graph-search-parameter-template-row {
  align-items: end;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.graph-search-parameter-template-row .graph-field {
  flex: 1 1 240px;
  min-width: 0;
}

.graph-search-parameter-template-row .graph-delete-search-parameter-template {
  align-self: end;
}

.graph-search-parameter-list {
  display: grid;
  gap: 10px;
}

.graph-search-parameter-empty {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 109, 91, 0.06), rgba(65, 111, 159, 0.045)),
    #fbfcfc;
  border: 1px dashed #cbdadd;
  border-radius: 14px;
  color: #68777d;
  display: flex;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  min-height: 86px;
  padding: 14px;
}

.graph-search-parameter-row {
  background: #f8fbfb;
  border: 1px solid #e2ecee;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.graph-search-parameter-row:hover {
  border-color: #c5dfd8;
  box-shadow: 0 4px 16px rgba(23, 52, 60, 0.06);
}

.graph-search-parameter-main {
  align-items: center;
  display: flex;
  gap: 10px;
}

/* The global `input, select { width: 100% }` reset otherwise makes every
   select's flex-basis resolve to the full row width, starving the value
   control of space. Give each control an explicit, content-appropriate
   basis instead and let the value control claim the rest. */
.graph-search-parameter-main select[name="sp_type"] {
  flex: 0 1 240px;
  width: auto;
}

.graph-search-parameter-main select[name="sp_operator"] {
  flex: 0 1 130px;
  width: auto;
}

.graph-search-parameter-main select[name="sp_value"],
.graph-search-parameter-main input[name="sp_value"] {
  flex: 1 1 220px;
  min-width: 0;
  width: auto;
}

.graph-search-parameter-main .graph-value-picker {
  flex: 1 1 260px;
  min-width: 0;
}

.graph-search-parameter-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.graph-search-parameter-meta .graph-weight-field {
  align-items: center !important;
  color: #56656b;
  display: flex !important;
  flex-direction: row !important;
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.graph-search-parameter-meta .graph-weight-field span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.graph-search-parameter-meta .graph-weight-field select {
  font-weight: 650;
  min-height: 34px !important;
  width: auto !important;
}

.graph-search-parameter-meta .graph-score-toggle {
  align-items: center !important;
  color: #56656b;
  display: flex !important;
  flex-direction: row !important;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.graph-search-parameter-meta .graph-score-toggle span {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.graph-search-parameter-meta .graph-score-toggle input {
  min-height: auto;
  width: auto;
}

.graph-search-parameter-row .graph-remove-search-parameter {
  background: transparent !important;
  border: 1px solid #d8e0e2 !important;
  border-radius: 8px !important;
  color: #8a3d3d !important;
  font-size: 18px !important;
  line-height: 1;
  min-height: 34px !important;
  padding: 0 !important;
  width: 34px !important;
}

.graph-search-parameter-row .graph-remove-search-parameter:hover {
  background: #fdf0f0 !important;
  border-color: #f5c6c6 !important;
  color: #a73434 !important;
}

@media (max-width: 760px) {
  .graph-search-parameter-row {
    grid-template-columns: 1fr;
  }

  .graph-search-parameter-main,
  .graph-search-parameter-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .graph-search-parameter-meta .graph-weight-field,
  .graph-search-parameter-meta .graph-score-toggle {
    flex-direction: row !important;
  }

  .graph-search-parameter-row .graph-remove-search-parameter {
    width: 100% !important;
  }
}

/* Search parameter badges */
.graph-badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.graph-badge-score {
  background: #e8f6f2;
  border: 1px solid #c5dfd8;
  color: #123c32;
}

.graph-badge-filter {
  background: #eef1f7;
  border: 1px solid #cdd3e4;
  color: #2c3155;
}

/* ============================================================
   Client polish layer — graph explorer + lead search
   ============================================================ */
:root {
  --accent: #0f6d5b;
  --accent-strong: #0d7563;
  --accent-dark: #17343c;
  --accent-soft: #e8f6f2;
  --accent-border: #c5dfd8;
  --ink: #172024;
  --muted: #657278;
  --line: #dfe8ea;
}

/* Wide shell for the graph explorer (lead search already wide via hero rule) */
.shell:has(.graph-explorer) {
  max-width: 1640px;
}

/* Topbar refinement */
.topbar {
  box-shadow: 0 1px 0 rgba(23, 32, 36, 0.03), 0 6px 18px rgba(23, 32, 36, 0.04);
}

nav a {
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a.active {
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

/* Loading state for submit buttons (forms with data-loading) */
button.is-loading {
  cursor: progress;
  opacity: 0.8;
}

.button-spinner {
  animation: button-spin 0.7s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  display: inline-block;
  height: 13px;
  margin-right: 8px;
  vertical-align: -2px;
  width: 13px;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

/* --- Graph explorer ------------------------------------------------ */

.graph-explorer-head h1 {
  letter-spacing: -0.02em;
}

.graph-explorer-stats .listing-export-button {
  border-radius: 999px;
}

/* Filter section header count badge */
.graph-filter-count {
  background: var(--accent-strong);
  border-radius: 999px;
  color: #ffffff;
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin-left: 7px;
  min-width: 18px;
  padding: 4px 6px;
  text-align: center;
  vertical-align: 1px;
}

/* Collapsible financial fields */
.graph-financial-details {
  grid-column: 1 / -1;
  min-width: 0;
}

.graph-financial-details > summary {
  align-items: center;
  background: #f8fbfb;
  border: 1px solid #e2ecee;
  border-radius: 11px;
  color: #46545a;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.05em;
  list-style: none;
  min-height: 40px;
  padding: 9px 12px;
  text-transform: uppercase;
  user-select: none;
}

.graph-financial-details > summary::-webkit-details-marker {
  display: none;
}

.graph-financial-details > summary::before {
  color: var(--accent-strong);
  content: "▸";
  font-size: 12px;
  transition: transform 0.15s ease;
}

.graph-financial-details[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.graph-financial-details[open] > summary::before {
  transform: rotate(90deg);
}

.graph-financial-details .graph-financial-summary-hint {
  color: #8b989d;
  font-weight: 750;
  letter-spacing: 0;
  margin-left: auto;
  text-transform: none;
}

.graph-financial-grid {
  background: #fbfdfd;
  border: 1px solid #e2ecee;
  border-radius: 0 0 11px 11px;
  border-top: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
}

/* Unified graph toolbar row */
.graph-explorer-toolbar .graph-view-switch {
  margin-bottom: 0;
}

.graph-explorer-toolbar .listing-export-button {
  border-radius: 10px;
  min-height: 38px;
}

/* Legend: category dot colors match node colors */
.graph-category-toggles label::before { opacity: 0.4; }
.graph-category-toggles label:has(input:checked)::before {
  box-shadow: 0 0 0 3px rgba(23, 32, 36, 0.08);
  opacity: 1;
}
.graph-category-toggles label:has(input[value="certification"])::before { background: #0f766e; }
.graph-category-toggles label:has(input[value="job"])::before { background: #2563eb; }
.graph-category-toggles label:has(input[value="news"])::before { background: #7c3aed; }
.graph-category-toggles label:has(input[value="procurement"])::before { background: #b45309; }
.graph-category-toggles label:has(input[value="industry"])::before { background: #475569; }
.graph-category-toggles label:has(input[value="technology"])::before { background: #0369a1; }
.graph-category-toggles label:has(input[value="process"])::before { background: #15803d; }
.graph-category-toggles label:has(input[value="capability"])::before { background: #64748b; }
.graph-category-toggles label:has(input[value="material"])::before { background: #92400e; }
.graph-category-toggles label:has(input[value="offering"])::before { background: #be123c; }
.graph-category-toggles label:has(input[value="application"])::before { background: #6d28d9; }
.graph-category-toggles label:has(input[value="buying_signal"])::before { background: #dc2626; }
.graph-category-toggles label:has(input[value="supplier_partnership"])::before { background: #4d7c0f; }
.graph-category-toggles label:has(input[value="collaboration"])::before { background: #0891b2; }
.graph-category-toggles label:has(input[value="sponsorship"])::before { background: #c2410c; }
.graph-category-toggles label:has(input[value="production_location"])::before,
.graph-category-toggles label:has(input[value="location"])::before { background: #334155; }
.graph-category-toggles label:has(input[value="company_size"])::before { background: #52525b; }
.graph-category-toggles label:has(input[value="seller_fit"])::before { background: #0f766e; }
.graph-category-toggles label:has(input[value="department"])::before { background: #0e7490; }
.graph-category-toggles label:has(input[value="role"])::before { background: #7e22ce; }
.graph-category-toggles label:has(input[value="employee"])::before { background: #be185d; }
.graph-category-toggles label:has(input[value="social"])::before { background: #db2777; }
.graph-category-toggles label:has(input[value="education"])::before { background: #1d4ed8; }
.graph-category-toggles label:has(input[value="employer"])::before { background: #9333ea; }
.graph-category-toggles label:has(input[value="interest"])::before { background: #16a34a; }
.graph-category-toggles label:has(input[value="activity_topic"])::before { background: #ea580c; }
.graph-category-toggles label:has(input[value="persona"])::before { background: #be185d; }
.graph-category-toggles label:has(input[value="project"])::before { background: #0f766e; }
.graph-category-toggles label:has(input[value="award"])::before { background: #ca8a04; }

/* Graph stage empty state */
.company-graph-stage {
  position: relative;
}

.graph-stage-empty {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(2px);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: absolute;
  text-align: center;
  z-index: 2;
}

.graph-stage-empty[hidden] {
  display: none;
}

.graph-stage-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.graph-stage-empty p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  max-width: 380px;
}

.graph-stage-empty a {
  color: var(--accent);
  font-weight: 800;
}

/* --- Lead search (query leads) ------------------------------------- */

/* Search summary stat blocks */
.filter-chip-group.is-stat {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.filter-chip-group.is-stat .filter-chip {
  background: #ffffff;
  border-color: var(--accent-border);
  color: #123c32;
  font-weight: 850;
}

.filter-chip-group.is-warning {
  background: #fdf6e7;
  border-color: #f0dcb0;
}

.filter-chip-group.is-warning .filter-chip-label {
  color: #8a6116;
}

.filter-chip-group.is-warning .filter-chip {
  background: #ffffff;
  border-color: #f0dcb0;
  color: #6e4e13;
}

.filter-chip-group.is-error {
  background: #fdf0f0;
  border-color: #f0c1c1;
}

.filter-chip-group.is-error .filter-chip-label {
  color: #9c3535;
}

.filter-chip-group.is-error .filter-chip {
  background: #ffffff;
  border-color: #f0c1c1;
  color: #7e2c2c;
}

/* Score badge + bar in results table */
.listing-score {
  display: grid;
  gap: 5px;
  min-width: 86px;
}

.listing-score-value {
  color: #123c32;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.listing-score-bar {
  background: #e6eeec;
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
  width: 86px;
}

.listing-score-bar span {
  background: linear-gradient(90deg, #0d7563, #14a085);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.listing-table tbody tr {
  transition: background 0.12s ease;
}

.listing-table tbody tr:hover {
  background: #f7fbfa;
}

.listing-score-tip {
  background: #f4f8f8;
  border: 1px solid #e2ecee;
  border-radius: 10px;
  color: #56656b;
  font-size: 12.5px;
  font-weight: 650;
  margin: 0 0 12px;
  padding: 9px 12px;
}

/* Pagination */
.listing-pagination {
  border-top: 1px solid #edf2f3;
  margin-top: 16px;
  padding-top: 14px;
}

.listing-pagination-form {
  justify-content: center;
}

.listing-pagination-form button {
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 10px;
  color: #17343c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 16px;
}

.listing-pagination-form button:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.listing-pagination-form button:disabled {
  cursor: default;
  opacity: 0.45;
}

.listing-pagination-status {
  font-weight: 750;
}

/* Empty result state */
.listing-empty {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 109, 91, 0.05), rgba(65, 111, 159, 0.04)),
    #fbfcfc;
  border: 1px dashed #cbdadd;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 34px 20px;
  text-align: center;
}

.listing-empty strong {
  color: var(--ink);
  font-size: 17px;
}

.listing-empty p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  max-width: 420px;
}

/* Template save popover */
.graph-template-popover-anchor {
  display: inline-block;
  position: relative;
}

.graph-template-popover {
  background: #ffffff;
  border: 1px solid #d4dee1;
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(23, 32, 36, 0.18);
  display: grid;
  gap: 10px;
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  z-index: 60;
}

.graph-template-popover[hidden] {
  display: none;
}

.graph-template-popover label {
  color: #56656b;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.graph-template-popover input {
  min-height: 38px;
}

.graph-template-popover-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.graph-template-popover-actions button {
  border-radius: 9px;
  font-size: 13px;
  min-height: 36px;
  padding: 7px 12px;
}

.graph-template-popover-actions .graph-template-cancel {
  background: #ffffff !important;
  border: 1px solid #d4dee1 !important;
  color: #46545a !important;
}

.graph-template-popover-status {
  color: #9c3535;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.graph-template-popover-status:empty {
  display: none;
}

/* Weight select as compact control */
.graph-search-parameter-row.is-score {
  border-left: 3px solid var(--accent-strong);
}

@media (max-width: 1180px) {
  .graph-financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .graph-financial-grid {
    grid-template-columns: 1fr;
  }

  .listing-score-bar {
    width: 64px;
  }
}

/* Category panel head with inline actions */
.graph-category-panel-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.graph-category-panel-head .graph-category-actions {
  margin-left: auto;
}

.graph-category-panel-head .listing-graph-tool {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

/* Toolbar alignment now that the view switch lives inside it */
.graph-explorer-toolbar {
  align-items: center;
}

.graph-explorer-toolbar > label {
  flex: 1 1 260px;
}

.graph-explorer-toolbar .graph-seller-toggle {
  margin-left: 0;
}

/* Brand-colored form controls */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent-strong);
}

/* Seller-node toggle inside the graph toolbar */
.graph-explorer-toolbar .graph-seller-toggle {
  align-items: center;
  color: #435158;
  display: inline-flex !important;
  flex: 0 0 auto;
  flex-direction: row;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.graph-explorer-toolbar .graph-seller-toggle input {
  height: 16px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 16px;
}

/* Template row must stay hidden when [hidden] despite display:flex */
.graph-search-parameter-template-row[hidden] {
  display: none;
}

/* --- Standardized Score & Nachweise columns ------------------------ */
.listing-evidence-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 480px;
}

.listing-evidence-cell .listing-evidence {
  margin: 0;
}

.listing-evidence.is-score {
  background: #e8f6f2;
  border-color: #9fd0c4;
  color: #0d5747;
}

.listing-evidence.is-score::before {
  content: "▲ ";
  font-size: 9px;
  vertical-align: 1px;
}

.listing-evidence.is-filter {
  background: #eef1f7;
  border-color: #ccd4e6;
  color: #2c3155;
}

.listing-evidence.is-filter::before {
  content: "✓ ";
}

.listing-evidence.is-miss {
  background: #f6f7f8;
  border-color: #dfe4e6;
  border-style: dashed;
  color: #829096;
  font-weight: 650;
}

.listing-evidence-more {
  background: #ffffff;
  border: 1px solid #cfdadd;
  color: #46545a;
  cursor: help;
  font-weight: 800;
}

/* Score tiers: fixed 0-100 scale so the same score always looks the same */
.listing-score {
  min-width: 96px;
}

.listing-score-value::after {
  color: #8b989d;
  content: " / 100";
  font-size: 11px;
  font-weight: 700;
}

.listing-score.is-high .listing-score-bar span {
  background: linear-gradient(90deg, #0d7563, #14a085);
}

.listing-score.is-mid .listing-score-bar span {
  background: linear-gradient(90deg, #b7791f, #d69e2e);
}

.listing-score.is-mid .listing-score-value {
  color: #6e4e13;
}

.listing-score.is-low .listing-score-bar span {
  background: #9aa7ac;
}

.listing-score.is-low .listing-score-value {
  color: #56656b;
}

/* Legend chips inside the tip line stay compact */
.listing-score-tip .listing-evidence {
  font-size: 11px;
  margin: 0 2px;
  padding: 2px 7px;
  vertical-align: 1px;
}

/* ====================================================================
   Lead-Suche page redesign — modern controls, cards, and summary
   ==================================================================== */

/* 1) Custom select styling (replaces native OS look) */
.graph-filter-panel select,
.graph-search-parameter-row select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230d7563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  border: 1px solid #d4dee1;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 650;
  min-height: 42px;
  padding: 9px 34px 9px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.graph-filter-panel select:hover,
.graph-search-parameter-row select:hover {
  border-color: #9cc4ba;
}

/* 2) Criteria header: undo the bottom-bar styling that leaks into it */
.graph-filter-row-head .graph-filter-actions {
  background: transparent;
  border-top: 0;
  border-radius: 0;
  gap: 10px;
  justify-content: flex-end;
  padding: 0;
}

.graph-add-search-parameter {
  background: var(--accent-strong) !important;
  border: 1px solid var(--accent-strong) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(13, 117, 99, 0.22);
  transition: background 0.15s ease, transform 0.1s ease;
}

.graph-add-search-parameter:hover {
  background: #0a5d4f !important;
}

.graph-add-search-parameter::before {
  content: "+ ";
  font-weight: 900;
}

.graph-save-search-parameter-template,
.graph-delete-search-parameter-template {
  background: #ffffff !important;
  border: 1px solid #cfdadd !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: #17343c !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.graph-save-search-parameter-template:hover,
.graph-delete-search-parameter-template:hover {
  background: #f4f9f8 !important;
  border-color: #9cc4ba !important;
}

/* 3) Criteria rows: one-line card layout */
.graph-search-parameter-row {
  align-items: center;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 32, 36, 0.03);
  display: grid;
  gap: 10px 18px;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  padding: 12px 14px;
}

.graph-search-parameter-row:hover {
  box-shadow: 0 6px 18px rgba(23, 52, 60, 0.08);
}

.graph-search-parameter-row.is-score {
  border-left: 3px solid var(--accent-strong);
}

.graph-search-parameter-main {
  min-width: 0;
}

.graph-search-parameter-meta {
  background: #f6faf9;
  border: 1px solid #e2ecee;
  border-radius: 999px;
  flex-wrap: nowrap;
  gap: 14px;
  padding: 5px 12px 5px 14px;
  white-space: nowrap;
}

/* Score toggle as a modern switch */
.graph-search-parameter-meta .graph-score-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background: #cfdadd;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 20px;
  margin: 0;
  min-height: 0;
  position: relative;
  transition: background 0.15s ease;
  width: 36px;
}

.graph-search-parameter-meta .graph-score-toggle input[type="checkbox"]::after {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 32, 36, 0.3);
  content: "";
  height: 16px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: left 0.15s ease;
  width: 16px;
}

.graph-search-parameter-meta .graph-score-toggle input[type="checkbox"]:checked {
  background: var(--accent-strong);
}

.graph-search-parameter-meta .graph-score-toggle input[type="checkbox"]:checked::after {
  left: 18px;
}

.graph-search-parameter-meta .graph-weight-field select {
  min-height: 34px !important;
  padding: 5px 30px 5px 10px;
}

/* Remove button: circular ghost icon */
.graph-search-parameter-row .graph-remove-search-parameter {
  align-self: center;
  border-radius: 50% !important;
  height: 36px;
  justify-self: center;
  min-height: 36px !important;
  width: 36px !important;
}

/* Value picker inside criteria rows: input + single toggle column.
   overflow must stay visible — the suggestions menu is an absolutely
   positioned child and would be clipped otherwise. */
.graph-search-parameter-value-picker {
  border-radius: 10px !important;
  grid-template-columns: minmax(0, 1fr) 38px !important;
  overflow: visible;
}

.graph-search-parameter-value-picker .graph-value-search {
  border-radius: 9px 0 0 9px !important;
}

.graph-search-parameter-value-picker .graph-value-search {
  min-height: 40px !important;
  padding: 9px 12px !important;
}

.graph-search-parameter-value-picker .graph-value-picker-toggle {
  min-height: 40px !important;
}

/* Keep the value picker usable when the scoring controls share the row. The
   first two selects used to absorb the available flex width, leaving only the
   picker chevron visible. Cap those controls and let a tight row wrap instead
   of collapsing the value field. */
.graph-search-parameter-main {
  flex-wrap: wrap;
}

.graph-search-parameter-main select[name="sp_type"] {
  flex: 0 1 210px;
  max-width: 210px;
  min-width: 110px;
  width: min(210px, 100%);
}

.graph-search-parameter-main select[name="sp_operator"] {
  flex: 0 1 170px;
  max-width: 170px;
  min-width: 140px;
  width: min(170px, 100%);
}

.graph-search-parameter-main .graph-search-parameter-value-picker {
  flex: 1 1 180px;
  min-width: 120px;
}

/* 4) Bottom actions bar of the criteria form */
.query-leads-filter-panel .graph-filter-actions {
  align-items: center;
  gap: 14px;
}

.query-leads-filter-panel .graph-filter-actions .graph-field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
  white-space: nowrap;
}

.query-leads-filter-panel .graph-filter-actions .graph-field select {
  width: 84px;
}

.query-leads-filter-panel .graph-filter-actions a {
  border: 1px solid #cfdadd;
  border-radius: 10px;
  padding: 10px 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.query-leads-filter-panel .graph-filter-actions a:hover {
  background: #f4f9f8;
  border-color: #9cc4ba;
}

.query-leads-filter-panel .graph-filter-actions button[type="submit"] {
  border-radius: 10px;
  padding-left: 22px;
  padding-right: 22px;
}

/* 5) Suchübersicht: compact inline chips instead of stacked rows */
.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip-group {
  background: #fbfcfc;
  border: 1px solid #e2ecee;
  border-radius: 12px;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 7px 12px;
  width: auto;
}

.filter-chip-group .filter-chip-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  min-width: 0;
  text-transform: uppercase;
}

.filter-chip-group .filter-chip {
  background: #ffffff;
  font-size: 13px;
}

.filter-chip-group.is-stat .filter-chip {
  font-size: 15px;
  font-weight: 900;
  min-width: 34px;
  text-align: center;
}

/* 6) Section heads: title left, action right */
.agent-plan-panel .section-head,
.listing-panel .section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.listing-panel .section-head .listing-export-button {
  border-radius: 10px;
  flex: 0 0 auto;
}

.section-head h2 {
  margin-bottom: 4px;
}

.section-head p {
  margin-bottom: 0;
}

/* 7) Flash messages */
.message {
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
}

.message.success {
  background: #e8f6f2;
  border-color: #c5dfd8;
  color: #123c32;
}

.message.success::before {
  content: "✓";
  font-weight: 900;
  margin-right: 8px;
}

.message.error {
  background: #fdf0f0;
  border-color: #f0c1c1;
  color: #7e2c2c;
}

/* 8) Hero chips */
.agent-stat-strip span {
  background: #e8f6f2;
  border: 1px solid #c5dfd8;
  box-shadow: none;
  color: #123c32;
}

@media (max-width: 980px) {
  .graph-search-parameter-row {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .graph-search-parameter-meta {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .query-leads-filter-panel .graph-filter-actions {
    flex-wrap: wrap;
  }
}

/* Value-picker toggle: real chevron button instead of tiny glyph */
.graph-search-parameter-value-picker .graph-value-picker-toggle {
  background: #f6faf9 !important;
  border-left: 1px solid #e2ecee !important;
  border-radius: 0 9px 9px 0 !important;
  color: transparent !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230d7563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.graph-search-parameter-value-picker .graph-value-picker-toggle:hover {
  background-color: #e8f6f2 !important;
}

/* Keep the floating chat pill clear of the feedback button */
.client-chat-panel {
  right: 84px;
}

@media (max-width: 760px) {
  .client-chat-panel {
    right: 16px;
  }

  .page-feedback {
    bottom: 76px;
  }
}

@media (max-width: 980px) {
  .graph-search-parameter-main {
    grid-column: 1;
    grid-row: 1;
  }

  .graph-search-parameter-row .graph-remove-search-parameter {
    grid-column: 2;
    grid-row: 1;
  }

  .graph-search-parameter-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Gewichtung 1-5: progressive green tint (data-weight synced via JS) */
.graph-weight-field select[data-weight="1"] {
  background-color: #f4f6f7;
  border-color: #dfe4e6;
  color: #5a6a70;
}

.graph-weight-field select[data-weight="2"] {
  background-color: #eaf6f2;
  border-color: #cfe6df;
  color: #1d6b58;
}

.graph-weight-field select[data-weight="3"] {
  background-color: #d9efe8;
  border-color: #b4dcd1;
  color: #10604f;
}

.graph-weight-field select[data-weight="4"] {
  background-color: #c2e6db;
  border-color: #96cfc0;
  color: #0b5344;
}

.graph-weight-field select[data-weight="5"] {
  background-color: #a8dccd;
  border-color: #74c0ad;
  color: #07443a;
  font-weight: 850;
}

/* Row accent edge mirrors the badge: green = Score, slate = Filter */
.graph-search-parameter-row {
  border-left: 3px solid #7d89bd;
}

.graph-search-parameter-row.is-score {
  border-left-color: var(--accent-strong);
}

/* --- Login & user management ------------------------------------------ */

.login-page {
  align-items: center;
  background: #f5f7f8;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.login-shell {
  padding: 28px;
  width: 100%;
  max-width: 420px;
}

.login-panel h1 {
  margin-bottom: 6px;
}

.login-panel p {
  color: #657278;
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.logout-form {
  align-items: center;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.current-user-name {
  color: #46545a;
  font-size: 13px;
}

.logout-form button {
  background: transparent;
  border: 1px solid #cbd4d8;
  color: #46545a;
  font-weight: 600;
  min-height: 34px;
  padding: 0 12px;
}

.logout-form button:hover {
  background: #e8f1ee;
  color: #123c32;
}

.seller-badge {
  color: #46545a;
  font-size: 13px;
  font-weight: 650;
}

.secondary-action {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b9c5ca;
  border-radius: 6px;
  color: #26363c;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  text-decoration: none;
  width: fit-content;
}

.secondary-action:hover {
  background: #edf3f1;
  border-color: #8ca49d;
  color: #123c32;
}

.secondary-action.compact-action {
  min-height: 34px;
  padding: 5px 10px;
}

.admin-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid .panel {
  margin-bottom: 20px;
}

.admin-grid .grid-form.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid .grid-form button {
  align-self: end;
}

.hint {
  color: #657278;
  font-size: 13px;
  margin-bottom: 0;
}

.admin-user-table td {
  vertical-align: middle;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-log-shell {
  max-width: 1520px;
}

.activity-log-heading {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.activity-log-heading p {
  margin-bottom: 0;
}

.activity-log-filters {
  align-items: end;
  background: #ffffff;
  border-bottom: 1px solid #d9e0e3;
  border-top: 1px solid #d9e0e3;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 420px) auto;
  margin: 0 -28px;
  padding: 16px 28px;
}

.activity-log-filters button {
  min-height: 40px;
  width: fit-content;
}

.activity-log-tabs {
  border-bottom: 1px solid #d9e0e3;
  display: flex;
  gap: 20px;
  margin: 0 0 16px;
  padding-top: 12px;
}

.activity-log-tabs a {
  background: transparent;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #526167;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 2px 9px;
}

.activity-log-tabs a.active,
.activity-log-tabs a:hover {
  background: transparent;
  border-bottom-color: #176b55;
  color: #123c32;
}

.activity-log-meta {
  align-items: baseline;
  color: #657278;
  display: flex;
  font-size: 13px;
  gap: 5px;
  margin-bottom: 12px;
}

.activity-log-meta strong {
  color: #172024;
  font-size: 18px;
}

.activity-log-table-wrap {
  border: 1px solid #d9e0e3;
  border-radius: 6px;
}

.activity-log-table {
  min-width: 1420px;
  table-layout: fixed;
}

.activity-log-table th:nth-child(1) { width: 160px; }
.activity-log-table th:nth-child(2) { width: 210px; }
.activity-log-table th:nth-child(3) { width: 130px; }
.activity-log-table th:nth-child(4) { width: 210px; }
.activity-log-table th:nth-child(5) { width: 330px; }
.activity-log-table th:nth-child(6) { width: 340px; }

.activity-log-time {
  color: #526167;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.activity-log-user strong,
.activity-log-user span,
.activity-log-context strong,
.activity-log-context span,
.activity-log-label {
  display: block;
  overflow-wrap: anywhere;
}

.activity-log-user span,
.activity-log-context span,
.activity-log-label {
  color: #657278;
  font-size: 12px;
  margin-top: 3px;
}

.activity-kind {
  border-radius: 4px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
  text-transform: uppercase;
}

.activity-kind-journey {
  background: #e5efeb;
  color: #15513f;
}

.activity-kind-feedback {
  background: #fff0cf;
  color: #7a4a00;
}

.activity-kind-chat {
  background: #e7eef8;
  color: #274c77;
}

.activity-log-content {
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.activity-log-details summary {
  color: #176b55;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.activity-log-details pre {
  background: #0b0d0e;
  border: 1px solid #24292d;
  border-radius: 4px;
  color: #f4f7f8;
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
}

.activity-log-pagination {
  justify-content: center;
  margin-top: 18px;
}

.activity-log-empty {
  border-bottom: 1px solid #d9e0e3;
  border-top: 1px solid #d9e0e3;
  color: #657278;
  padding: 32px 0;
}

.inline-form {
  align-items: center;
  display: flex;
  gap: 6px;
}

.inline-form input,
.inline-form select {
  min-height: 34px;
  min-width: 0;
  padding: 5px 8px;
  width: auto;
}

.inline-form button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.inline-form button.danger {
  background: #b3372f;
}

.inline-form button.danger:hover {
  background: #92271f;
}

.user-status {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
}

.user-status.is-active {
  background: #e6f4ed;
  color: #15513f;
}

.user-status.is-inactive {
  background: #f8e8e6;
  color: #8a2a22;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .activity-log-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-log-filters {
    grid-template-columns: 1fr;
  }
}

/* --- Company page: modern hero, team & social ------------------------- */

.modern-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f2f8f6 100%);
  border-radius: 12px;
}

.modern-hero-main {
  min-width: 0;
}

.modern-hero-title {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.modern-hero-title h1 {
  margin-bottom: 8px;
}

.company-avatar {
  align-items: center;
  background: #176b55;
  border-radius: 14px;
  color: #ffffff;
  display: flex;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 800;
  height: 56px;
  justify-content: center;
  letter-spacing: 0.5px;
  width: 56px;
}

.modern-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}

.button-link.is-secondary {
  background: #ffffff;
  border: 1px solid #cbd4d8;
  color: #123c32;
}

.button-link.is-secondary:hover {
  background: #e8f1ee;
}

.profile-description {
  color: #384850;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 860px;
}

/* Team & Ansprechpartner */

.team-section .profile-scroll {
  display: grid;
  gap: 18px;
}

.team-department h3 {
  border-bottom: 1px solid #e1e7e9;
  color: #123c32;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
  padding-bottom: 6px;
  text-transform: uppercase;
}

.team-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-card {
  background: #fbfdfc;
  border: 1px solid #dfe7e5;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.team-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
}

.team-avatar {
  align-items: center;
  background: #e3efeb;
  border-radius: 50%;
  color: #176b55;
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.team-card-identity {
  min-width: 0;
}

.team-card-identity strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.team-card-identity span {
  color: #657278;
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}

.team-linkedin {
  background: #eef4ff;
  border: 1px solid #c6d6f2;
  border-radius: 6px;
  color: #1d4e89;
  font-size: 12px;
  font-weight: 750;
  margin-left: auto;
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.team-linkedin:hover {
  background: #dcE9fd;
}

.team-summary {
  color: #526167;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.team-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.team-contact-row a {
  color: #176b55;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  word-break: break-all;
}

.team-contact-row a:hover {
  text-decoration: underline;
}

.team-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-chip {
  background: #eef2f1;
  border-radius: 999px;
  color: #46545a;
  font-size: 11.5px;
  font-weight: 650;
  padding: 4px 9px;
}

.team-chip.is-persona {
  background: #e6f4ed;
  color: #15513f;
}

.team-chip.is-topic {
  background: #f0ecfa;
  color: #5b3fa8;
}

.team-history {
  display: grid;
  gap: 4px;
  margin: 0;
}

.team-history div {
  display: flex;
  gap: 8px;
}

.team-history dt {
  color: #657278;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 750;
  min-width: 118px;
}

.team-history dd {
  color: #384850;
  font-size: 12.5px;
  margin: 0;
}

/* Social sidebar */

.social-link-list {
  display: grid;
  gap: 8px;
}

.social-link {
  align-items: baseline;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
}

.social-link:hover {
  background: #f2f8f6;
}

.social-link strong {
  color: #123c32;
  font-size: 13.5px;
}

.social-link span {
  color: #657278;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .modern-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* --- Multi-year financials: trend chips, as-of-year badges, sparklines --- */

.financial-trend {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  padding: 2px 9px;
  margin-top: 10px;
  white-space: nowrap;
}

.financial-trend-positive {
  background: #e8f6f2;
  border-color: #a8d4c9;
  color: #0f5d4c;
}

.financial-trend-neutral {
  background: #eef3f4;
  border-color: #d4dee1;
  color: #44555c;
}

.financial-trend-negative {
  background: #fdecec;
  border-color: #f0c2c2;
  color: #9b2c2c;
}

.financial-year {
  color: #5b6b70;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.financial-year.is-stale {
  background: #fdf3e3;
  border-radius: 999px;
  color: #8a5a10;
  padding: 1px 7px;
}

.financial-sparkline {
  display: block;
  overflow: visible;
}

.financial-sparkline polyline {
  fill: none;
  stroke: #0f6d5b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.financial-sparkline-zero {
  stroke: #c2ced2;
  stroke-dasharray: 3 3;
  stroke-width: 1;
}

.financial-history {
  display: grid;
  gap: 12px;
}

.financial-history-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.financial-history-table th,
.financial-history-table td {
  border-bottom: 1px solid #eef2f3;
  padding: 4px 8px 4px 0;
  text-align: right;
}

.financial-history-table th:first-child,
.financial-history-table td:first-child {
  text-align: left;
}

.financial-history-table th {
  color: #5b6b70;
  font-weight: 700;
}

.financial-history-negative {
  color: #9b2c2c;
}

.financial-series-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.financial-history-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.listing-financial-cell {
  min-width: 150px;
}

.listing-financial-figures {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 1px;
  margin-bottom: 4px;
}

/* Weight only feeds the score, so it is inert on a hard-filter row. Mute it there
   rather than showing the same weight-colour scale that signals importance.
   The <select> stays enabled on purpose: sp_weight is read as a positional
   getlist() array server-side, so a disabled (non-submitting) control would
   misalign every subsequent row's weight. */
.graph-search-parameter-row:not(.is-score) .graph-weight-field {
  opacity: 0.5;
}

.graph-search-parameter-row:not(.is-score) .graph-weight-field select {
  background: #f4f7f7;
  border-color: #d9e3e1;
  color: #5b6b70;
}

.listing-score-criteria {
  color: #5b6b70;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
}

.graph-weight-share {
  color: #0f6d5b;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.graph-search-parameter-row:not(.is-score) .graph-weight-share {
  display: none;
}

/* The named levels are 1/2/3/5/8, so the old data-weight="4" rule no longer
   applies; 8 ("Entscheidend") reuses the strongest colour. */
.graph-weight-field select[data-weight="8"] {
  background: #0f6d5b;
  border-color: #0f6d5b;
  color: #ffffff;
}
