:root {
  color-scheme: dark;
  --page: #071015;
  --surface: rgba(10, 22, 28, 0.88);
  --surface-strong: rgba(14, 30, 37, 0.96);
  --ink: #edf8f6;
  --soft-ink: #bfd1d9;
  --muted: #8497a7;
  --line: rgba(124, 238, 220, 0.16);
  --teal: #2de0c2;
  --blue: #7aa2ff;
  --deep: #e9f7ff;
  --amber: #f5b84a;
  --coral: #ff6d6a;
  --teal-soft: rgba(45, 224, 194, 0.11);
  --blue-soft: rgba(122, 162, 255, 0.12);
  --amber-soft: rgba(245, 184, 74, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --panel-glow: 0 0 0 1px rgba(45, 224, 194, 0.08), 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--page);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(rgba(45, 224, 194, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 162, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 49, 59, 0.96), rgba(7, 16, 21, 0.98) 420px),
    var(--page);
  background-size: 34px 34px, 34px 34px, auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  width: calc(100% - 32px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(45, 224, 194, 0.24);
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 1.08rem;
  font-weight: 820;
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 720;
  line-height: 1.2;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.partnership-link {
  max-width: min(100%, 360px);
  border: 1px solid rgba(45, 224, 194, 0.2);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--soft-ink);
  background: rgba(7, 16, 21, 0.58);
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
  text-align: right;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.partnership-link:hover,
.partnership-link:focus-visible {
  border-color: rgba(45, 224, 194, 0.5);
  color: var(--teal);
  background: rgba(45, 224, 194, 0.09);
}

.scope-pill {
  border: 1px solid rgba(122, 162, 255, 0.22);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--blue);
  background: rgba(122, 162, 255, 0.09);
  font-size: 0.78rem;
  font-weight: 760;
}

.status-pill {
  min-width: 86px;
  border: 1px solid rgba(45, 224, 194, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--teal);
  background: rgba(7, 16, 21, 0.76);
  font-size: 0.82rem;
  font-weight: 730;
  text-align: center;
}

.status-pill.busy {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill.error {
  color: var(--coral);
  background: rgba(255, 109, 106, 0.12);
}

.search-surface {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(45, 224, 194, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(18, 39, 47, 0.94), rgba(9, 20, 26, 0.9));
  box-shadow: var(--panel-glow);
}

.search-copy {
  display: grid;
  gap: 6px;
  max-width: 790px;
  margin-bottom: 16px;
}

.search-copy h1 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(1.65rem, 1.12rem + 1.8vw, 2.62rem);
  line-height: 1.04;
}

.search-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.search-bar {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.file-input {
  display: none;
}

.image-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft-ink);
  background: rgba(7, 16, 21, 0.62);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.image-upload:hover,
.image-upload:focus-within {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 224, 194, 0.12);
}

.image-icon {
  width: 20px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  position: relative;
}

.image-icon::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  right: 2px;
  top: 2px;
  border-radius: 50%;
  background: currentColor;
}

.image-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 6px;
  background: linear-gradient(135deg, transparent 45%, currentColor 46% 55%, transparent 56%),
    linear-gradient(45deg, transparent 45%, currentColor 46% 55%, transparent 56%);
}

#queryInput {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  outline: none;
  color: var(--ink);
  background: rgba(5, 12, 16, 0.78);
  font-size: 0.98rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#queryInput:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 224, 194, 0.14);
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 176px;
  height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #00a88f, #0a4b70 54%, #182342);
  font-weight: 760;
  transition: transform 150ms ease, background 150ms ease;
}

.search-button:hover {
  background: linear-gradient(135deg, #21d3b8, #11638e 54%, #24335d);
}

.search-button:active {
  transform: translateY(1px);
}

.search-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.image-preview {
  display: inline-grid;
  grid-template-columns: 30px minmax(0, max-content) auto;
  max-width: 100%;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 6px 5px 5px;
  background: rgba(8, 18, 23, 0.92);
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--teal-soft);
}

.image-preview span {
  min-width: 0;
  color: var(--soft-ink);
  font-size: 0.8rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  color: var(--deep);
  background: rgba(7, 16, 21, 0.86);
  font-size: 0;
  font-weight: 760;
}

.image-preview button::before {
  content: "x";
  font-size: 0.84rem;
  line-height: 1;
}

.search-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.search-footnote span {
  border: 1px solid rgba(45, 224, 194, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--soft-ink);
  background: rgba(45, 224, 194, 0.08);
  font-size: 0.77rem;
  font-weight: 740;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--soft-ink);
  background: rgba(8, 18, 23, 0.8);
  font-size: 0.82rem;
  font-weight: 720;
}

.quick-row button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.map-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(122, 162, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(12, 26, 33, 0.96), rgba(6, 14, 18, 0.92));
  box-shadow: var(--panel-glow);
}

.map-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.map-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 0.92rem + 0.62vw, 1.48rem);
  line-height: 1.12;
}

.map-stats {
  border: 1px solid rgba(245, 184, 74, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--amber);
  background: rgba(245, 184, 74, 0.1);
  font-size: 0.78rem;
  font-weight: 780;
  white-space: nowrap;
}

.map-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  align-items: stretch;
}

.map-viewport {
  position: relative;
  min-height: 390px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(122, 162, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(45, 224, 194, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 162, 255, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 15, 24, 0.94), rgba(4, 9, 14, 0.98));
  background-size: 28px 28px, 28px 28px, auto;
}

.map-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 49%, rgba(45, 224, 194, 0.08) 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, rgba(122, 162, 255, 0.07) 50%, transparent 51%);
}

.leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: #071015;
  transition: opacity 180ms ease;
}

.map-viewport.leaflet-ready .leaflet-map {
  opacity: 1;
}

.map-viewport.map-runtime-error::before {
  content: "Map runtime unavailable";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 780;
  background: rgba(7, 16, 21, 0.86);
}

.leaflet-container {
  color: var(--ink);
  background: #071015;
  font: inherit;
}

.leaflet-tile {
  filter: saturate(1.08) contrast(1.04);
}

.leaflet-control-zoom a {
  border-color: rgba(124, 238, 220, 0.16) !important;
  color: var(--ink) !important;
  background: rgba(7, 16, 21, 0.92) !important;
}

.leaflet-control-zoom a:hover {
  color: var(--teal) !important;
  background: rgba(12, 31, 38, 0.96) !important;
}

.leaflet-control-attribution {
  color: var(--muted) !important;
  background: rgba(7, 16, 21, 0.72) !important;
  font-size: 0.65rem !important;
}

.leaflet-control-attribution a {
  color: var(--soft-ink) !important;
}

.leaflet-result-marker {
  display: grid;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid rgba(45, 224, 194, 0.64);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(3, 12, 16, 0.88);
  box-shadow: 0 0 0 6px rgba(45, 224, 194, 0.12), 0 0 28px rgba(45, 224, 194, 0.38);
  transform: translate(-50%, -50%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.leaflet-result-marker span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  color: #061014;
  background: var(--teal);
  font-size: 0.72rem;
  font-weight: 850;
}

.leaflet-result-marker:hover,
.leaflet-result-marker.selected {
  border-color: var(--amber);
  box-shadow: 0 0 0 8px rgba(245, 184, 74, 0.14), 0 0 34px rgba(245, 184, 74, 0.42);
  z-index: 900 !important;
}

.leaflet-result-marker.selected span {
  background: var(--amber);
}

.leaflet-result-marker.compact {
  width: 18px !important;
  height: 18px !important;
  box-shadow: 0 0 0 5px rgba(45, 224, 194, 0.1), 0 0 20px rgba(45, 224, 194, 0.28);
}

.leaflet-result-marker.compact span {
  width: 8px;
  height: 8px;
  color: transparent;
  background: var(--blue);
}

.leaflet-result-marker.compact.selected span {
  background: var(--amber);
}

.map-detail {
  min-height: 100%;
  border: 1px solid rgba(45, 224, 194, 0.14);
  border-radius: 8px;
  padding: 14px;
  color: var(--soft-ink);
  background:
    linear-gradient(180deg, rgba(12, 28, 35, 0.92), rgba(7, 16, 21, 0.92));
}

.map-detail-kicker {
  display: block;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-detail strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.26;
}

.map-detail p {
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.43;
}

.map-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.map-detail-meta span {
  border: 1px solid rgba(122, 162, 255, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--blue);
  background: rgba(122, 162, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 750;
}

.map-detail-axes {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.map-detail-axes div {
  border-top: 1px solid rgba(124, 238, 220, 0.12);
  padding-top: 8px;
}

.map-detail-axes span {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.map-detail-axes p {
  margin-top: 4px;
}

.map-jump {
  width: 100%;
  min-height: 36px;
  margin-top: 14px;
  border: 1px solid rgba(45, 224, 194, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(45, 224, 194, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
}

.map-jump:hover {
  border-color: var(--teal);
  background: rgba(45, 224, 194, 0.16);
}

.results-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-top: 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.28rem, 1rem + 1vw, 1.9rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: rgba(8, 18, 23, 0.84);
  font-size: 0.82rem;
  font-weight: 720;
}

.notice {
  margin-top: 16px;
  border: 1px solid rgba(255, 109, 106, 0.34);
  border-radius: 8px;
  padding: 13px 15px;
  color: #ffc7c2;
  background: rgba(255, 109, 106, 0.12);
  font-size: 0.94rem;
  line-height: 1.45;
}

.notice.info {
  border-color: rgba(45, 224, 194, 0.24);
  color: var(--soft-ink);
  background: var(--teal-soft);
}

.results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid rgba(124, 238, 220, 0.14);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.result-card.map-selected {
  border-color: rgba(245, 184, 74, 0.42);
  box-shadow: 0 0 0 1px rgba(245, 184, 74, 0.12), 0 18px 48px rgba(0, 0, 0, 0.28);
}

.rank-pill {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--blue-soft);
  font-size: 0.86rem;
  font-weight: 820;
}

.result-main {
  min-width: 0;
}

.result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.result-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 810;
  line-height: 1.33;
  text-decoration: none;
}

.result-title:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  border: 1px solid rgba(45, 224, 194, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--teal);
  background: rgba(45, 224, 194, 0.09);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: 2px;
}

.source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.source-line span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.source-line span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: rgba(132, 151, 167, 0.84);
}

.contact-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 8px;
  margin-top: 12px;
}

.contact-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid rgba(45, 224, 194, 0.18);
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(13, 28, 35, 0.96), rgba(8, 19, 23, 0.92));
  font-size: 0.78rem;
  font-weight: 760;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.contact-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border-radius: 6px;
  padding: 4px 6px;
  color: #03100e;
  background: var(--teal);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.contact-value {
  min-width: 0;
  color: var(--soft-ink);
  overflow-wrap: anywhere;
}

.contact-chip:hover {
  border-color: rgba(45, 224, 194, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-chip:hover .contact-value {
  color: var(--teal);
}

.muted-contact {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(8, 18, 23, 0.74);
  font-size: 0.78rem;
  font-weight: 720;
}

.business-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.business-meta-item {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(5, 12, 16, 0.42);
}

.business-meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.business-meta-item strong {
  display: block;
  margin-top: 4px;
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.score-box {
  min-width: 74px;
  border: 1px solid rgba(45, 224, 194, 0.24);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
  background: var(--teal-soft);
  text-align: center;
}

.score-value {
  display: block;
  font-size: 1.12rem;
  font-weight: 840;
  line-height: 1;
}

.summary {
  margin: 14px 0 0;
  color: var(--soft-ink);
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.source-cluster {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 16, 0.42);
}

.source-cluster-head {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.source-cluster-list {
  display: grid;
}

.source-cluster-list a,
.source-cluster-static {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.source-cluster-list a + a,
.source-cluster-list a + .source-cluster-static,
.source-cluster-static + a,
.source-cluster-static + .source-cluster-static {
  border-top: 1px solid var(--line);
}

.source-cluster-list a:hover {
  color: var(--teal);
}

.source-cluster-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-cluster-list em {
  color: var(--muted);
  font-style: normal;
}

.signal {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(5, 12, 16, 0.42);
}

.signal span,
.detail-row span {
  display: block;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 830;
  text-transform: uppercase;
}

.signal p,
.detail-row p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-size: 0.86rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.details {
  margin-top: 12px;
}

.details summary {
  width: max-content;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 780;
  cursor: pointer;
}

.details-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--ink);
  background: rgba(8, 18, 23, 0.78);
  font-size: 0.84rem;
  font-weight: 760;
  text-decoration: none;
}

.action-link:hover,
.action-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.skeleton {
  min-height: 168px;
  overflow: hidden;
  position: relative;
}

.skeleton::before,
.skeleton::after {
  content: "";
  display: block;
  grid-column: 2;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(45, 224, 194, 0.08), rgba(122, 162, 255, 0.18), rgba(45, 224, 194, 0.08));
  background-size: 240% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton::before {
  width: 60%;
  height: 20px;
  margin-bottom: 16px;
}

.skeleton::after {
  width: 100%;
  height: 92px;
}

mark {
  border-radius: 4px;
  padding: 0 2px;
  color: inherit;
  background: rgba(245, 184, 74, 0.28);
}

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

@keyframes shimmer {
  to {
    background-position: -240% 0;
  }
}

@media (max-width: 820px) {
  .signals,
  .business-meta {
    grid-template-columns: 1fr;
  }

  .map-body {
    grid-template-columns: 1fr;
  }

  .map-viewport {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 22px);
    padding-top: 18px;
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .scope-pill {
    display: none;
  }

  .metrics {
    justify-content: flex-start;
  }

  .map-header {
    align-items: stretch;
    flex-direction: column;
  }

  .map-stats {
    width: max-content;
    max-width: 100%;
  }

  .search-bar {
    grid-template-columns: 44px minmax(0, 1fr);
    max-width: 100%;
  }

  .image-upload {
    width: 44px;
    height: 44px;
  }

  .search-button {
    grid-column: 1 / -1;
    width: auto;
    justify-self: stretch;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .rank-pill {
    width: 30px;
    height: 30px;
  }

  .result-head {
    grid-template-columns: 1fr;
  }

  .score-box {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .search-surface,
  .map-panel,
  .result-card {
    padding: 13px;
  }

  .map-viewport {
    min-height: 240px;
  }

  #queryInput,
  .search-button {
    height: 46px;
  }
}
