.customer-discovery-page {
  display: grid;
  gap: 18px;
}

.customer-discovery-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, .7fr) 110px auto;
  gap: 12px;
  align-items: end;
}

.customer-discovery-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.customer-discovery-form label > span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.customer-discovery-form input,
.customer-discovery-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised, #15181d);
  color: var(--text, #f7f7f7);
  padding: 9px 11px;
  font: inherit;
}

.customer-discovery-form input:focus-visible,
.customer-discovery-form select:focus-visible,
.customer-discovery-actions .button:focus-visible,
.customer-discovery-search-actions .button:focus-visible,
.customer-discovery-identity-option .button:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 2px;
}

.customer-discovery-search-actions {
  display: grid;
  gap: 8px;
}

.customer-discovery-search-help {
  display: block;
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.5;
}

.customer-discovery-search-help strong {
  color: var(--text);
}

.customer-discovery-identity-assist {
  border-color: rgba(213, 173, 83, .38);
  background: linear-gradient(145deg, rgba(213, 173, 83, .07), rgba(255, 255, 255, .018));
}

.customer-discovery-identity-message {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 173, 83, .28);
  border-radius: 9px;
  background: rgba(213, 173, 83, .06);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.customer-discovery-identity-options {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.customer-discovery-identity-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .16);
}

.customer-discovery-identity-option > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-discovery-identity-option strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.customer-discovery-identity-option small {
  color: var(--text-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.customer-discovery-provider,
.customer-discovery-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.customer-discovery-provider > span,
.customer-discovery-metrics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
  padding: 12px;
}

.customer-discovery-provider strong,
.customer-discovery-metrics strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.customer-discovery-provider small,
.customer-discovery-metrics small,
.customer-discovery-metrics span {
  color: var(--text-soft);
  line-height: 1.45;
}

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

.customer-discovery-metrics span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.customer-discovery-results {
  display: grid;
  gap: 14px;
}

.customer-discovery-summary {
  display: grid;
  gap: 4px;
  padding: 4px 2px;
}

.customer-discovery-summary strong {
  color: var(--text);
  font-size: 12px;
}

.customer-discovery-summary span {
  color: var(--text-soft);
  font-size: 11px;
}

.customer-discovery-candidate .panel-header {
  align-items: start;
}

.customer-discovery-score {
  display: grid;
  min-width: 82px;
  justify-items: end;
}

.customer-discovery-score strong {
  color: var(--gold-strong);
  font-size: 26px;
  line-height: 1;
}

.customer-discovery-score small {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.customer-discovery-copy {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.customer-discovery-copy p {
  margin: 0;
}

.customer-discovery-copy strong {
  color: var(--text);
}

.customer-discovery-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.customer-discovery-ranking-details,
.customer-discovery-identity-review {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  padding: 11px 13px;
}

.customer-discovery-ranking-details {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.customer-discovery-ranking-details summary,
.customer-discovery-identity-review > summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.customer-discovery-ranking-details p {
  margin: 10px 0 6px;
}

.customer-discovery-identity-review {
  display: grid;
  gap: 12px;
  border-color: rgba(213, 173, 83, .32);
}

.customer-discovery-identity-review > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.customer-discovery-candidate-review {
  border-style: dashed;
  border-color: rgba(213, 173, 83, .28);
}

.customer-discovery-notice {
  padding: 12px 14px;
  border: 1px solid rgba(67, 174, 116, .45);
  border-radius: 10px;
  background: rgba(67, 174, 116, .1);
  color: #bde9cf;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .customer-discovery-form {
    grid-template-columns: 1fr 1fr;
  }

  .customer-discovery-search-actions,
  .customer-discovery-form button {
    width: 100%;
  }

  .customer-discovery-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .customer-discovery-form,
  .customer-discovery-provider,
  .customer-discovery-metrics {
    grid-template-columns: 1fr;
  }

  .customer-discovery-actions .button,
  .customer-discovery-identity-option .button {
    width: 100%;
  }

  .customer-discovery-identity-option {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-discovery-score {
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-discovery-page *,
  .customer-discovery-page *::before,
  .customer-discovery-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
