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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
}

.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #5f6b85;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.25;
}

.muted-text {
  margin-bottom: 0;
  color: #5f6b85;
  line-height: 1.45;
}

.badge {
  flex: 0 0 auto;
  border: 1px solid #c9d5e8;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: #42526e;
  font-size: 13px;
  font-weight: 700;
}

.top-link-button,
.top-url-field {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: #2349dd;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}

.top-url-field {
  width: min(34vw, 320px);
  min-height: 36px;
  color: #42526e;
  font-weight: 600;
}

.top-link-button {
  min-height: auto;
  cursor: pointer;
}

.top-link-button:hover {
  background: #eef3fb;
}

.panel {
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 16px;
  background: #ffffff;
}

.potential-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.section-heading h3 {
  margin: 0;
}

.potential-task-heading {
  align-items: end;
}

.potential-task-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-field {
  min-width: 230px;
}

.product-select-field {
  min-width: 280px;
}

.copy-url-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #16335f;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.copy-url-button:hover {
  color: #2f5cf6;
  text-decoration: underline;
}

.inline-copy {
  font-weight: 600;
}

.deal-list {
  display: grid;
  gap: 0;
}

.deal-table {
  overflow: hidden;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
}

.deal-table-row {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.95fr)
    minmax(110px, 0.55fr)
    minmax(160px, 0.75fr)
    minmax(120px, 0.55fr)
    minmax(260px, 1.5fr)
    minmax(110px, 0.55fr)
    minmax(180px, 0.9fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-top: 1px solid #e8eef7;
}

.deal-table-row:first-child {
  border-top: 0;
}

.deal-table-head {
  background: #f8fafc;
  color: #5f6b85;
  font-size: 13px;
  font-weight: 800;
}

.deal-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.deal-title a {
  color: #20304a;
  text-decoration: none;
}

.deal-title a:hover {
  text-decoration: underline;
}

.deal-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  padding: 5px 8px;
  background: #eef3fb;
  color: #42526e;
  font-size: 12px;
  font-weight: 800;
}

.deal-active {
  background: #e6f6ee;
  color: #17633c;
}

.deal-won {
  background: #eef3fb;
  color: #2349dd;
}

.deal-lost {
  background: #fff0f0;
  color: #9b1c1c;
}

.deal-products,
.deal-loss {
  color: #42526e;
  line-height: 1.4;
}

.deal-loss {
  color: #9b1c1c;
  white-space: pre-line;
}

.task-list {
  display: grid;
  gap: 0;
}

.task-table {
  overflow: hidden;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
}

.task-table-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1fr)
    minmax(170px, 0.75fr)
    minmax(140px, 0.55fr)
    minmax(150px, 0.7fr)
    minmax(100px, 0.45fr)
    minmax(260px, 1.25fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-top: 1px solid #e8eef7;
}

.task-table-row:first-child {
  border-top: 0;
}

.task-table-head {
  background: #f8fafc;
  color: #5f6b85;
  font-size: 13px;
  font-weight: 800;
}

.task-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.task-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  padding: 5px 8px;
  background: #eef3fb;
  color: #42526e;
  font-size: 12px;
  font-weight: 800;
}

.task-open {
  background: #fff4df;
  color: #8a5a00;
}

.task-closed {
  background: #e6f6ee;
  color: #17633c;
}

.task-report {
  color: #42526e;
  line-height: 1.4;
  white-space: pre-line;
}

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

.website-meta {
  display: grid;
  grid-template-columns: minmax(100px, 0.2fr) minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
  color: #42526e;
  font-size: 13px;
}

.website-meta dt {
  color: #5f6b85;
  font-weight: 800;
}

.website-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.website-link {
  color: #0b5fff;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.website-link:hover {
  text-decoration: none;
}

.website-summary-text {
  margin: 0;
  color: #20242f;
  line-height: 1.45;
}

.product-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(190px, 0.45fr) minmax(460px, 1.75fr);
  gap: 16px;
  padding: 12px;
  border-top: 1px solid #e8eef7;
  align-items: start;
}

.product-row:first-child,
.product-row-head + .product-row {
  border-top: 0;
}

.product-row-head {
  border-top: 0;
  background: #f8fafc;
  color: #5f6b85;
  font-size: 13px;
  font-weight: 800;
}

.product-name {
  font-weight: 800;
}

.product-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  padding: 5px 8px;
  background: #eef3fb;
  color: #42526e;
  font-size: 12px;
  font-weight: 800;
}

.product-status.state-recommend,
.product-status.state-investigate {
  background: #e6f6ee;
  color: #17633c;
}

.product-status.state-unknown {
  background: #f1f5f9;
  color: #64748b;
}

.product-status.state-active_deal_exists,
.product-status.state-already_sold {
  background: #eef3fb;
  color: #2349dd;
}

.product-status.state-not_recommended {
  background: #f1f5f9;
  color: #64748b;
}

.product-note {
  color: #42526e;
  line-height: 1.4;
}

.product-note-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.product-note-list li {
  padding-left: 2px;
}

.potential-result-history {
  margin-top: 8px;
}

.potential-result-history summary {
  cursor: pointer;
  color: #2f5eea;
  font-weight: 800;
}

.potential-other-row {
  display: block;
}

.potential-other-products summary {
  cursor: pointer;
  color: #5f6b85;
  font-weight: 800;
}

.potential-other-list {
  margin: 8px -12px -12px;
}

.potential-other-list .product-row:first-child {
  border-top: 1px solid #e8eef7;
}

.potential-result-item {
  margin-top: 6px;
  color: #364257;
}

.scoring-top-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.scoring-check-block {
  min-width: 0;
}

.no-approval-history .scoring-top-grid {
  grid-template-columns: 1fr;
}

.approval-history {
  min-width: 0;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.approval-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.approval-heading h3 {
  margin: 0;
}

.approval-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef3fb;
  color: #2349dd;
  font-size: 12px;
  font-weight: 800;
}

.approval-select-field {
  margin-bottom: 12px;
}

.approval-result {
  margin-bottom: 12px;
  color: #20242f;
  font-weight: 800;
  line-height: 1.45;
}

.approval-meta {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #4c5870;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #20242f;
  font: inherit;
}

input:focus,
select:focus {
  border-color: #315bff;
  outline: 3px solid rgba(49, 91, 255, 0.16);
}

input[readonly] {
  background: #f8fafc;
  color: #42526e;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #315bff;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #2349dd;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

button.secondary {
  border: 1px solid #cbd5e1;
  background: #eef3fb;
  color: #2349dd;
}

button.secondary:hover {
  background: #e3ebf8;
}

button.warning {
  color: #8a5a00;
}

.last-check {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: #4c5870;
  font-size: 13px;
  font-weight: 700;
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  color: #59657a;
  line-height: 1.45;
}

.status-line:empty {
  display: none;
}

.status-line.success {
  color: #1f6b43;
  font-weight: 700;
}

.status-line.error {
  color: #a83232;
  font-weight: 700;
}

.status-line.info {
  color: #42526e;
}

.status-line.muted {
  min-height: 0;
  color: #6b7280;
  font-size: 13px;
}

.result-panel {
  border-left: 4px solid #315bff;
}

.decision-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.decision-badge {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 8px 10px;
  background: #edf2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.decision-badge.standard {
  background: #e6f6ee;
  color: #17633c;
}

.decision-badge.review {
  background: #fff4df;
  color: #8a5a00;
}

.decision-badge.decline {
  background: #ffe8e8;
  color: #a83232;
}

.summary-text {
  margin-bottom: 14px;
  color: #445168;
  line-height: 1.5;
}

.panel-summary {
  margin-bottom: 12px;
  color: #445168;
  font-weight: 800;
  line-height: 1.45;
}

.panel-summary.good {
  color: #17633c;
}

.panel-summary.warn {
  color: #8a5a00;
}

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

.details-grid .panel {
  margin-bottom: 0;
}

.reason-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #364257;
  line-height: 1.45;
}

.reason-list.compact {
  max-height: 280px;
  overflow: auto;
}

.reason-list strong {
  color: #20242f;
}

.product-note a {
  color: #2f5eea;
  font-weight: 800;
  text-decoration: none;
}

.product-note a:hover {
  text-decoration: underline;
}

.data-list,
.context-list {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

dt {
  color: #5f6b85;
  font-weight: 700;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.tone-good {
  color: #445168;
}

.tone-warn {
  color: #8a5a00;
  font-weight: 700;
}

.tone-status-good {
  color: #0f6b3b;
  font-weight: 700;
}

.tone-status-warn {
  color: #8a5a00;
  font-weight: 700;
}

.tone-status-bad {
  color: #b42318;
  font-weight: 700;
}

.tone-neutral {
  color: #445168;
}

.diagnostics {
  margin-top: 12px;
  color: #4c5870;
}

.diagnostics summary {
  cursor: pointer;
  font-weight: 700;
}

pre {
  overflow: auto;
  margin: 14px 0 0;
  border-radius: 8px;
  padding: 12px;
  background: #111827;
  color: #e5e7eb;
  white-space: pre-wrap;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .shell {
    padding: 14px;
  }

  .topbar,
  .decision-row {
    display: block;
  }

  .topbar-actions {
    margin-top: 10px;
  }

  .badge,
  .decision-badge,
  .top-link-button,
  .top-url-field {
    display: inline-block;
  }

  .top-url-field {
    width: 100%;
  }

  .potential-intro,
  .section-heading,
  .deal-table-row,
  .task-table-row,
  .potential-task-actions,
  .scoring-top-grid,
  .form-grid,
  .columns,
  .details-grid,
  .approval-meta,
  .data-list,
  .context-list {
    grid-template-columns: 1fr;
  }

  .potential-intro {
    display: grid;
  }

  .product-row,
  .product-row-head,
  .deal-table-row,
  .task-table-row {
    grid-template-columns: 1fr;
  }

  .product-row-head,
  .deal-table-head,
  .task-table-head {
    display: none;
  }
}

.product-client-text-block {
  position: relative;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.product-client-text-head {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  user-select: none;
  padding-right: 44px;
}

.product-client-text-block[open] > .product-client-text-head {
  margin-bottom: 8px;
}

.client-copy-icon {
  position: absolute;
  top: 0;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.client-copy-icon:hover {
  background: transparent;
  color: #2349dd;
}

.client-copy-icon.copied {
  background: transparent;
  color: #16a34a;
}

.product-client-text {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}

.client-copy-button {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 10px;
  background: #ffffff;
  color: #16335f;
  font: inherit;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}

.client-copy-button:hover {
  background: #2349dd;
  border-color: #2349dd;
  color: #ffffff;
}


/* Сравнительная таблица льгот Сколково vs ИТ-аккредитация */
.product-compare-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.product-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.4;
}
.product-compare-table th,
.product-compare-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.product-compare-table thead th {
  background: #eef2f7;
  color: #334155;
  font-weight: 600;
}
.product-compare-table td.compare-label {
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.product-compare-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.product-compare-table tr.compare-total td {
  font-weight: 700;
  background: #eef2f7;
  border-top: 2px solid #cbd5e1;
}
.compare-note {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.compare-verdict {
  margin: 10px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #16335f;
}

/* ===== Льготные кредиты (оценка) ===== */
.credit-programs { display: flex; flex-direction: column; gap: 20px; }
.credit-program { border: 1px solid #e3e8ef; border-radius: 12px; padding: 14px 16px; background: #fff; }
.credit-program-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.credit-program-head h4 { margin: 0; font-size: 15px; font-weight: 600; }
.credit-verdict { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.credit-verdict-note { font-size: 12px; color: #9a6a00; margin: -4px 0 8px; }
.credit-table { display: flex; flex-direction: column; }
.credit-row { display: grid; grid-template-columns: 28px minmax(180px, 1.4fr) 150px minmax(160px, 1.6fr); gap: 10px; padding: 4px 0; border-top: 1px solid #eef1f5; align-items: start; }
.credit-row:first-child { border-top: none; }
.credit-num { color: #8a94a6; font-size: 12px; padding-top: 2px; }
.credit-q { font-size: 13px; line-height: 1.35; }
.credit-ans { display: flex; flex-direction: column; gap: 2px; }
.credit-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-align: center; }
.credit-manual-tag { font-size: 10px; color: #8a94a6; text-transform: uppercase; letter-spacing: .03em; }
.credit-comment {
  font-size: 12px; color: #5b6472; line-height: 1.35;
  width: 100%; height: 30px; min-height: 30px; resize: none; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
  border: 1px solid #e3e8ef; border-radius: 8px; padding: 6px 8px;
  font-family: inherit; background: #fbfcfe; box-sizing: border-box;
}
.credit-comment:focus {
  outline: 2px solid #2f6bff33; border-color: #b7c6ee; background: #fff;
  white-space: pre-wrap; overflow-y: auto; position: relative; z-index: 2;
}
.credit-overridden { background: #f6f9ff; }
.credit-overridden .credit-num::after { content: " ✎"; color: #2f6bff; }
.credit-yes { background: #e6f4ea; color: #1e7d34; }
.credit-no { background: #fdecec; color: #c0392b; }
.credit-unknown { background: #fef6e0; color: #9a6a00; }
.credit-na { background: #eef1f5; color: #6b7280; }
.credit-actions { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credit-save-status { font-size: 12px; color: #8a94a6; }
.credit-save-status.credit-save-ok { color: #1e7d34; }
.credit-save-status.credit-save-err { color: #c0392b; }
.credit-save-hint { font-size: 12px; color: #8a94a6; }
.credit-comment-cell { display: flex; gap: 8px; align-items: flex-start; }
.credit-comment-cell .credit-comment { flex: 1 1 auto; min-width: 0; }
.credit-comment-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; margin-right: 10px; }
.credit-row-save {
  align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; min-height: 0; padding: 0; border: 1px solid #d5dbe6; border-radius: 7px;
  background: #fff; color: #4c6ef5; cursor: pointer;
}
.credit-row-save:hover { background: #f0f4ff; border-color: #b7c6ee; }
.credit-row-save:disabled { opacity: .5; cursor: default; }
.credit-row-saved { font-size: 11px; color: #8a94a6; }
.credit-row-saved:empty { display: none; }
.credit-comment-actions { gap: 2px; position: relative; }
.credit-comment-actions .credit-row-saved { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 1px; white-space: nowrap; }
.credit-q .credit-manual-tag { margin-top: 1px; }
.credit-terms { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 6px 10px; background: #f6f8fb; border-radius: 8px; font-size: 13px; }
.credit-term { display: inline-flex; gap: 6px; align-items: baseline; }
.credit-term-label { color: #8a94a6; font-size: 12px; }
.credit-term-value { font-weight: 600; color: #1f2733; }
.credit-row-saved.ok { color: #1e7d34; }
.credit-row-saved.err { color: #c0392b; }
@media (max-width: 720px) {
  .credit-row { grid-template-columns: 22px 1fr; }
  .credit-ans, .credit-comment-cell { grid-column: 2; }
  .credit-num { grid-row: span 3; }
}

/* Редактируемые ответы в оценке льготных кредитов */
.credit-select {
  width: 100%;
  height: 30px;
  min-height: 0;
  line-height: 1;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #d7dce4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.credit-select:focus { outline: 2px solid #2f6bff33; }
select.credit-yes { background: #e6f4ea; color: #1e7d34; border-color: #bfe3c8; }
select.credit-no { background: #fdecec; color: #c0392b; border-color: #f3c6c1; }
select.credit-unknown { background: #fef6e0; color: #9a6a00; border-color: #f0dfa8; }
select.credit-na { background: #eef1f5; color: #6b7280; border-color: #dde2e9; }
.credit-manual-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  color: #8a94a6;
  text-transform: uppercase;
  letter-spacing: .03em;
}


/* --- Потенциал: финансы и вывод скоринга --- */
.potential-scoring.decline-accent { }
.potential-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.potential-contacts-panel { min-width: 0; }
.finance-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.finance-tiles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}
.finance-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 160px;
  min-width: 150px;
  padding: 12px 16px;
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 10px;
  background: var(--panel-soft, #f7f9fc);
}
.finance-tile-label { font-size: 12px; color: #6b7280; }
.finance-tile-value { font-size: 20px; font-weight: 600; }
.finance-chart { position: relative; width: 100%; }
.finance-chart.hidden { display: none; }
.finance-hit { fill: transparent; cursor: pointer; }
.finance-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background: #1f2937;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 5;
}
.finance-tooltip.hidden { display: none; }
.finance-tip-year { font-weight: 600; margin-bottom: 3px; }
.finance-tip-row { display: flex; align-items: center; gap: 6px; }
@media (max-width: 900px) {
  .potential-columns { grid-template-columns: 1fr; }
}
.finance-svg { width: 100%; height: auto; display: block; }
.finance-legend { display: flex; gap: 18px; margin-bottom: 6px; font-size: 13px; color: #4b5563; }
.finance-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.finance-swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.finance-swatch.revenue { background: #4c8dff; }
.finance-swatch.profit { background: #7ac943; }
.finance-grid { stroke: #e5e9f0; stroke-width: 1; stroke-dasharray: 3 4; }
.finance-zero { stroke: #c2c9d6; stroke-width: 1.5; }
.finance-axis { fill: #8a94a6; font-size: 12px; }
.finance-line { fill: none; stroke-width: 2.5; }
.finance-line.revenue { stroke: #4c8dff; }
.finance-line.profit { stroke: #7ac943; }
.finance-area { stroke: none; opacity: 0.14; }
.finance-area.revenue { fill: #4c8dff; }
.finance-area.profit { fill: #7ac943; }
.finance-dot { stroke: #fff; stroke-width: 1.5; }
.finance-dot.revenue { fill: #4c8dff; }
.finance-dot.profit { fill: #7ac943; }


/* --- Потенциал: контакты --- */
.contact-group { margin-bottom: 14px; }
.contact-group:last-child { margin-bottom: 0; }
.contact-group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #8a94a6; margin-bottom: 6px; }
.contact-person { padding: 8px 0; border-bottom: 1px solid #eef1f6; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.contact-person-info { min-width: 0; }
.contact-person:last-child { border-bottom: none; }
.contact-person-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-person-name { font-weight: 600; }
.contact-badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #eef2ff; color: #4c5bd4; white-space: nowrap; }
.contact-badge.founder { background: #eafaf0; color: #2f9e57; }
.contact-person-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.contact-line { display: flex; gap: 10px; padding: 4px 0; font-size: 13px; }
.contact-line-label { color: #8a94a6; flex: 0 0 64px; }
.contact-line-value { color: #1f2937; word-break: break-word; }


/* --- Потенциал: контакты, кнопки и компактные общие --- */
.contact-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.contact-btn { font-size: 12px; padding: 3px 10px; border: 1px solid #c9d3e6; border-radius: 8px; background: #fff; color: #2f57d4; cursor: pointer; white-space: nowrap; }
.contact-btn:hover:not(:disabled) { background: #2f57d4; color: #fff; border-color: #2f57d4; }
.contact-btn:disabled { opacity: .55; cursor: default; }
.contact-action-status { font-size: 11px; color: #8a94a6; text-align: right; }
.contact-action-status.ok { color: #2f9e57; }
.contact-action-status.err { color: #e5484d; }
.contact-action-status.info { color: #8a94a6; }
.contact-gen-type { margin-bottom: 10px; }
.contact-gen-type:last-child { margin-bottom: 0; }
.contact-gen-head { font-size: 12px; color: #6b7280; font-weight: 600; margin-bottom: 4px; }
.contact-gen-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 13px; }
.contact-gen-row.hidden { display: none; }
.contact-gen-value { flex: 1 1 auto; word-break: break-word; }
.contact-gen-row .contact-btn { padding: 2px 8px; }
.contact-toggle { font-size: 12px; color: #4c5bd4; cursor: pointer; background: none; border: none; padding: 3px 0; }


/* --- Потенциал: выбор контакта для общего контакта --- */
.contact-gen-row { flex-wrap: wrap; }
.contact-pick-wrap { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; margin-top: 4px; }
.contact-pick { flex: 1 1 auto; min-width: 0; font-size: 13px; padding: 3px 6px; border: 1px solid #c9d3e6; border-radius: 8px; background: #fff; }
