/* ── Lead Agent — Design System ─────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg-deep: #070b14;
  --bg-surface: #0d1321;
  --bg-card: rgba(17, 24, 39, 0.72);
  --bg-card-hover: rgba(22, 32, 54, 0.85);
  --border: rgba(99, 102, 241, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text: #e8edf5;
  --text-muted: #8b9cb8;
  --text-dim: #5a6a85;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --cyan: #06b6d4;
  --ice: #7dd3fc;
  --ice-bg: rgba(125, 211, 252, 0.16);
  --ice-border: rgba(125, 211, 252, 0.4);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.12);
  --nav-bg: rgba(7, 11, 20, 0.75);
  --nav-mobile-bg: rgba(7, 11, 20, 0.95);
  --input-bg: rgba(255, 255, 255, 0.04);
  --ghost-bg: rgba(255, 255, 255, 0.05);
  --ghost-bg-hover: rgba(255, 255, 255, 0.08);
  --hover-bg: rgba(99, 102, 241, 0.12);
  --hover-bg-subtle: rgba(99, 102, 241, 0.06);
  --table-head-bg: rgba(255, 255, 255, 0.03);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-active-bg: rgba(99, 102, 241, 0.15);
  --badge-gray-bg: rgba(255, 255, 255, 0.06);
  --score-track: rgba(255, 255, 255, 0.06);
  --spinner-track: rgba(255, 255, 255, 0.15);
  --focus-ring: rgba(99, 102, 241, 0.15);
  --ambient-1: rgba(99, 102, 241, 0.22);
  --ambient-2: rgba(6, 182, 212, 0.14);
  --ambient-3: rgba(99, 102, 241, 0.04);
  --jh-profile-name: #c084fc;
  --jh-company-name: #fb923c;
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-deep: #f0f4fa;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --border: rgba(99, 102, 241, 0.22);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --accent-light: #4f46e5;
  --ice: #0284c7;
  --ice-bg: rgba(14, 165, 233, 0.14);
  --ice-border: rgba(14, 165, 233, 0.32);
  --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.07) 100%);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.07);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --input-bg: rgba(15, 23, 42, 0.04);
  --ghost-bg: rgba(15, 23, 42, 0.04);
  --ghost-bg-hover: rgba(15, 23, 42, 0.07);
  --hover-bg: rgba(99, 102, 241, 0.1);
  --hover-bg-subtle: rgba(99, 102, 241, 0.05);
  --table-head-bg: rgba(15, 23, 42, 0.03);
  --chip-bg: rgba(15, 23, 42, 0.04);
  --chip-active-bg: rgba(99, 102, 241, 0.12);
  --badge-gray-bg: rgba(15, 23, 42, 0.07);
  --score-track: rgba(15, 23, 42, 0.08);
  --spinner-track: rgba(15, 23, 42, 0.12);
  --focus-ring: rgba(99, 102, 241, 0.2);
  --ambient-1: rgba(99, 102, 241, 0.14);
  --ambient-2: rgba(6, 182, 212, 0.1);
  --ambient-3: rgba(99, 102, 241, 0.03);
  --jh-profile-name: #9333ea;
  --jh-company-name: #ea580c;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, var(--ambient-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, var(--ambient-2) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%, var(--ambient-3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition);
}

a { color: inherit; text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────────── */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 48px;
}

/* Companies list: use nearly full viewport width (~½″ side margins) */
.page-content.page-content--wide {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: calc(var(--nav-h) + 32px) 0.5in 48px;
  box-sizing: border-box;
}

.page-content--wide .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-content--wide .data-table {
  min-width: 1040px;
}

.page-content--wide .data-table .col-revenue {
  white-space: nowrap;
}

.metric-formatted {
  cursor: help;
  border-bottom: 1px dotted color-mix(in srgb, var(--text-dim) 55%, transparent);
}

/* ── Navigation ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.nav-brand span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  list-style: none;
  min-width: 0;
}

.nav-links li {
  flex: 0 0 auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links a {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--hover-bg);
}

.nav-links a.active {
  color: var(--accent-light);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--ghost-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-search-btn {
  text-decoration: none;
}

.nav-icon-btn:hover,
.nav-icon-btn.active {
  background: var(--hover-bg);
  color: var(--accent-light);
  border-color: var(--border);
}

.nav-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Hero / Search ───────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-title {
  display: inline-block;
  max-width: 100%;
}

.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
}

/* search panel */
.search-panel {
  max-width: min(100%, var(--search-tabs-width, 720px));
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0 0;
  backdrop-filter: none;
  box-shadow: none;
}

.search-mode-panel[data-search-mode="lookup"] .search-mode-body--lookup,
.search-mode-panel[data-search-mode="lookup"] .search-mode-hint {
  width: min(100%, var(--search-bar-width, 88%));
  margin-left: auto;
  margin-right: auto;
}

.search-mode-panel .search-mode-hint {
  margin-top: 22px;
}

.discovery-result-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
}

.discovery-result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.discovery-result-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
}

.discovery-result-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.discovery-result-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.discovery-result-badge {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.discovery-result-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.discovery-result-meta li {
  padding: 10px 12px;
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.discovery-result-meta dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.discovery-result-meta dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.discovery-result-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 14px 16px;
  background: var(--gradient-soft);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

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

.discovery-profile-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, var(--bg-card)) 0%, var(--bg-card) 42%),
    var(--bg-card);
  box-shadow: var(--shadow-glow);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 20px;
  padding: 22px 24px 20px;
}

.discovery-profile-preview::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0.85;
}

.discovery-profile-preview-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.discovery-profile-preview-identity {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.discovery-profile-preview-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.discovery-profile-preview-title {
  margin: 0;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
}

.discovery-profile-preview-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.discovery-profile-preview-name {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.discovery-profile-preview-name-row .lead-linkedin-icon {
  margin-left: 0;
}

.discovery-profile-preview .discovery-profile-preview-headline {
  max-width: none;
  margin: 4px 0 0;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.discovery-profile-preview-identity .discovery-result-badge {
  display: inline-flex;
  margin: 8px 0 0;
}

.discovery-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 96px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.discovery-profile-preview-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.discovery-profile-preview-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--gradient-soft);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discovery-profile-preview-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin-top: 14px;
}

.discovery-profile-preview-info-col {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.discovery-profile-preview-info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.45;
}

.discovery-profile-preview-info-emoji {
  flex: none;
}

.discovery-profile-preview-info-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.discovery-profile-preview-info-text .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .discovery-profile-preview-info {
    grid-template-columns: 1fr;
  }
}

.discovery-company-list {
  margin-top: 16px;
}

.discovery-company-list-title {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discovery-company-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.discovery-company-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.discovery-company-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.discovery-company-card-name {
  color: var(--text-primary);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.discovery-company-card-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.discovery-company-card .list-enrich-btn {
  flex: none;
}

.discovery-company-preview {
  grid-column: 1 / -1;
}

.discovery-company-loader {
  grid-column: 1 / -1;
}

.discovery-company-card-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent-light);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.discovery-company-card-link:hover {
  background: var(--gradient-soft);
  color: var(--accent);
}

.discovery-profile-preview-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  padding: 8px 0 0;
  color: var(--accent-light);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.discovery-profile-preview-link:hover {
  color: var(--accent);
}

.discovery-profile-preview-link svg {
  transition: transform 160ms ease;
}

.discovery-profile-preview-link:hover svg {
  transform: translateX(3px);
}

.search-mode-tabs {
  display: flex;
  align-self: stretch;
  width: 100%;
  margin: 0 0 20px;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

.search-panel form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.search-mode-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-mode-tab:hover {
  color: var(--text);
}

.search-mode-tab.is-active,
.search-mode-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 8%, transparent);
}

.search-mode-panel[hidden] {
  display: none !important;
}

.search-mode-panel.is-active {
  display: block;
}

.search-mode-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-mode-body--lookup {
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

.search-mode-body--lookup .search-input-wrap {
  flex: 1;
  min-width: 0;
}

.search-mode-body--discovery {
  justify-content: center;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-submit-btn {
  flex-shrink: 0;
  width: auto;
  min-width: 96px;
  height: 38px;
  padding: 0 18px;
  border-radius: calc(var(--radius-sm) - 2px);
  justify-content: center;
  box-sizing: border-box;
  font-size: 0.84rem;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.22);
}

.search-submit-btn:hover:not(:disabled) {
  transform: none;
  box-shadow: 0 3px 14px rgba(99, 102, 241, 0.3);
}

.discovery-trigger {
  width: auto;
  min-width: 220px;
  max-width: none;
  height: 48px;
  flex-direction: row;
  gap: 10px;
  padding: 0 28px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.22);
  box-sizing: border-box;
}

.discovery-trigger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-discovery:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hero .search-mode-hint,
.search-panel .search-mode-hint {
  margin: 22px auto 0;
  padding: 0;
  border: none;
  max-width: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.search-panel .search-error {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  color: #ef4444;
}

.search-error[hidden] {
  display: none;
}

.search-mode-body--lookup:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-subtle));
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-input-wrap input.input-invalid {
  box-shadow: none;
}

.search-mode-body--lookup:has(input.input-invalid) {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 16px;
  height: 16px;
  overflow: visible;
  flex-shrink: 0;
}

.search-input-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 40px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.2;
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
  box-shadow: none;
}

.search-input-wrap input:focus {
  border: none;
  box-shadow: none;
}

.search-input-wrap input::placeholder { color: var(--text-dim); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: var(--ghost-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--ghost-bg-hover);
  color: var(--text);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-group {
  flex: 1;
  min-width: 140px;
}

.filter-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.filter-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9cb8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.filter-group select:focus {
  border-color: var(--accent);
}

.filter-group select option {
  background: var(--bg-surface);
  color: var(--text);
}

/* ── Stats Cards ─────────────────────────────────────────────── */
.stats-section {
  margin-top: 48px;
}

.stats-section-header {
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.section-header-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
}

.section-header-link {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.section-header-link:hover,
.section-header-link:focus-visible {
  color: var(--accent-light);
  outline: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.stat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card .stat-change {
  font-size: 0.8rem;
  margin-top: 6px;
  color: var(--green);
}

.stat-card .stat-change.neutral { color: var(--text-dim); }

.stat-card .stat-detail {
  font-size: 0.75rem;
  line-height: 1.45;
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-muted);
}

.stat-card--rich .stat-value {
  font-size: 1.85rem;
}

.stat-card--loading {
  pointer-events: none;
}

.stat-card--loading:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-subtle);
}

.stat-skeleton-bar {
  display: inline-block;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--text) 8%, transparent) 0%,
    color-mix(in srgb, var(--text) 16%, transparent) 50%,
    color-mix(in srgb, var(--text) 8%, transparent) 100%
  );
  background-size: 200% 100%;
  animation: stats-skeleton-shine 1.15s ease-in-out infinite;
  vertical-align: middle;
}

.stat-skeleton-bar--value {
  height: 1.55rem;
  margin-top: 2px;
}

@keyframes stats-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Section headers ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ── Page header (inner pages) ───────────────────────────────── */
.page-header {
  margin-bottom: 32px;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.page-header-row h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.page-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-header-badges .badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.toolbar-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  position: relative;
}

.toolbar-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.toolbar-search input:focus {
  border-color: var(--accent);
}

.toolbar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.toolbar-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.company-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.company-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
}

.company-tab:hover { opacity: 1; }

.company-tab.active {
  opacity: 1;
  border-bottom-color: var(--indigo, #6366f1);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.list-enrich-btn {
  white-space: nowrap;
  --rel-action-accent: color-mix(in srgb, var(--accent) 72%, var(--cyan));
  --rel-action-fg: color-mix(in srgb, var(--accent-light) 88%, var(--text));
  --rel-action-fg-strong: color-mix(in srgb, var(--accent-light) 90%, var(--cyan));
}

.list-enrich-btn--icon,
[data-theme="light"] .list-enrich-btn--icon {
  padding: 4px;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 6px;
}

.list-enrich-btn--icon .cp-rel-pull-btn-icon {
  width: 20px;
  height: 20px;
  background: transparent;
}

.list-enrich-btn--icon .cp-rel-pull-btn-icon svg {
  width: 16px;
  height: 16px;
}

.list-enrich-btn--icon:hover:not(:disabled) {
  background: color-mix(in srgb, var(--rel-action-accent) 12%, transparent);
  border: none;
  box-shadow: none;
}

.lead-linkedin-icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
  color: #0a66c2;
}

.company-cell:has(> .lead-linkedin-icon) {
  width: 100%;
}

.lead-linkedin-icon svg {
  width: 16px;
  height: 16px;
}

.lead-linkedin-icon:hover {
  opacity: 0.8;
}

.list-item--static,
.list-item--static:hover {
  cursor: default;
}

.data-table tbody tr.list-item--static:hover {
  background: inherit;
}

.list-cell-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover,
.chip.active {
  background: var(--chip-active-bg);
  border-color: var(--border);
  color: var(--accent-light);
}

.chip-cold.active,
.chip-cold:hover {
  background: var(--ice-bg);
  border-color: var(--ice-border);
  color: var(--ice);
}

.chip-warm.active,
.chip-warm:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--amber);
}

.chip-hot.active,
.chip-hot:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--red);
}

/* ── Company filters panel ───────────────────────────────────── */
.company-filters {
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.company-filters-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.company-filters-toggle:hover {
  background: var(--hover-bg-subtle);
}

.company-filters-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.company-filters-toggle-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.applied-filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 8px;
  max-width: min(720px, 55vw);
  text-align: right;
  line-height: 1.4;
}

.applied-filter-chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.applied-filter-label {
  font-weight: 600;
  color: var(--accent-light);
}

.applied-filters-and {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 2px;
}

.company-filters-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--text);
}

.company-filters-chevron {
  display: block;
  overflow: visible;
  transition: transform 0.2s;
}

.company-filters-toggle[aria-expanded="true"] .company-filters-chevron {
  transform: rotate(90deg);
}

.company-filters-toggle:hover .company-filters-chevron-wrap {
  color: var(--accent-light);
}

.company-filters-panel {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.company-filters-panel.is-open {
  display: block;
}

.company-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.company-filters-grid .filter-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.company-filters-grid .filter-group input,
.company-filters-grid .filter-group select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.company-filters-grid .filter-group input:focus,
.company-filters-grid .filter-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-range input {
  flex: 1;
  min-width: 0;
}

.filter-range span {
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.company-filters-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--hover-bg-subtle);
}

/* ── Data Table ──────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--table-head-bg);
}

.data-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

#companies-table-view .data-table thead,
#leads-table-view .data-table thead {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.08));
}

#companies-table-view .data-table th,
#leads-table-view .data-table th {
  padding: 16px 18px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  border-bottom: 2px solid rgba(99, 102, 241, 0.45);
}

#companies-table-view .data-table th:first-child,
#leads-table-view .data-table th:first-child {
  border-top-left-radius: 12px;
}

#companies-table-view .data-table th:last-child,
#leads-table-view .data-table th:last-child {
  border-top-right-radius: 12px;
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--hover-bg-subtle);
}

.data-table tbody tr.company-row {
  cursor: pointer;
}

.data-table tbody tr.company-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.table-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.table-score--high { color: var(--green); }
.table-score--medium { color: var(--amber); }
.table-score--low { color: var(--red); }

.list-fit-scores {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.list-fit-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.list-fit-score-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.company-card-header .list-fit-scores,
.lead-card-header .list-fit-scores {
  margin-top: 2px;
}

.text-muted {
  color: var(--text-dim);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.company-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-light);
  flex-shrink: 0;
  overflow: hidden;
}

.company-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.company-avatar--photo.company-avatar--broken {
  background: var(--gradient);
}

.company-avatar--photo.company-avatar--broken .company-avatar-img {
  display: none;
}

.company-avatar--photo.company-avatar--broken::after {
  content: attr(data-initials);
  font-size: inherit;
  font-weight: 700;
  color: #fff;
}

.company-name {
  font-weight: 600;
  color: var(--text);
}

.company-domain {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }
.badge-cyan   { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.badge-ice    { background: var(--ice-bg); color: var(--ice); border: 1px solid var(--ice-border); }
.badge-green  { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-amber  { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.badge-red    { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-gray   { background: var(--badge-gray-bg); color: var(--text-muted); }

/* ── Score Ring ──────────────────────────────────────────────── */
.score-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
}

.score-ring.high {
  background: conic-gradient(var(--green) calc(var(--score) * 3.6deg), var(--score-track) 0);
  color: var(--green);
}

.score-ring.medium {
  background: conic-gradient(var(--amber) calc(var(--score) * 3.6deg), var(--score-track) 0);
  color: var(--amber);
}

.score-ring.low {
  background: conic-gradient(var(--red) calc(var(--score) * 3.6deg), var(--score-track) 0);
  color: var(--red);
}

.score-ring::after {
  content: attr(data-score);
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Company detail: score out of 10 (top-right) */
.score-ring--out-of {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.score-ring--out-of.high {
  background: conic-gradient(var(--green) calc(var(--score-pct) * 3.6deg), var(--score-track) 0);
  color: var(--green);
}

.score-ring--out-of.medium {
  background: conic-gradient(var(--amber) calc(var(--score-pct) * 3.6deg), var(--score-track) 0);
  color: var(--amber);
}

.score-ring--out-of.low {
  background: conic-gradient(var(--red) calc(var(--score-pct) * 3.6deg), var(--score-track) 0);
  color: var(--red);
}

.score-ring--out-of::after {
  content: none;
}

.score-ring--out-of .score-ring-inner {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

.score-ring--out-of .score-ring-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: inherit;
  line-height: 1;
}

.score-ring--out-of .score-ring-max {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  line-height: 1;
}

.company-detail-header .company-detail-score {
  align-self: flex-start;
  margin-top: 2px;
}

/* ── Leads list loading overlay ──────────────────────────────── */
.leads-list {
  position: relative;
}

.leads-list-body {
  position: relative;
  min-height: 200px;
}

.leads-list.is-busy .leads-list-body {
  min-height: 220px;
}

.leads-list-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  backdrop-filter: blur(2px);
  border-radius: var(--radius);
}

.leads-list-busy[hidden] {
  display: none !important;
}

.leads-list-busy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  padding: 28px 16px 40px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 94%, transparent) 0%,
    color-mix(in srgb, var(--bg) 75%, transparent) 65%,
    transparent 100%
  );
}

.leads-list-busy-spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.leads-list.is-busy .pagination {
  pointer-events: none;
  opacity: 0.55;
}

/* ── Lead cards (grid view) ──────────────────────────────────── */
.leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.leads-grid[hidden] {
  display: none !important;
}

/* Person initials avatar (leads list, connected leads, lead detail) */
.lead-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--gradient);
  color: #fff;
}

.lead-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.lead-avatar--photo {
  padding: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

.lead-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lead-avatar--photo.lead-avatar--broken {
  background: var(--gradient);
}

.lead-avatar--photo.lead-avatar--broken .lead-avatar-img {
  display: none;
}

.lead-avatar--photo.lead-avatar--broken::after {
  content: attr(data-initials);
  font-size: inherit;
  font-weight: 700;
  color: #fff;
}

.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  min-width: 0;
  overflow: hidden;
}

.lead-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.lead-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}

.lead-card-header .company-cell {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}

.lead-card-title-block {
  flex: 1;
  min-width: 0;
}

.lead-card-title-block .company-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  word-break: break-word;
}

.lead-card-title-block .company-domain {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-skill-technology-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.lead-skill-technology-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.lead-card-current-role {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, var(--bg-surface), transparent);
}

.lead-card-current-role-heading {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.lead-card-role-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.lead-card-current-role-label {
  flex: 0 0 82px;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 500;
}

.lead-card-current-role-value {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lead-card-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 16px;
  margin: 0;
}

.lead-card-stats div {
  min-width: 0;
}

.lead-card-stats dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0 0 2px;
}

.lead-card-stats dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}

.lead-card-footer {
  margin-top: 12px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.lead-card-date {
  margin-left: auto;
  color: var(--text-dim);
  white-space: nowrap;
}

.lead-linkedin-icon + .lead-linkedin-icon {
  margin-left: 0;
}

.company-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  max-width: 420px;
}

.list-social-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lead-card-footer .lead-linkedin-icon {
  margin-left: 0;
  padding-left: 0;
}

.lead-card-footer .lead-link {
  color: var(--accent-light);
  text-decoration: none;
}

.lead-card-footer .lead-link:hover {
  text-decoration: underline;
}

.data-table tbody tr.lead-row {
  cursor: pointer;
}

.lead-card.lead-row--static,
.data-table tbody tr.lead-row.lead-row--static {
  cursor: default;
}

.data-table tbody tr.lead-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.lead-link {
  color: var(--accent-light);
  text-decoration: none;
}

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

.lead-company-cell {
  min-width: 0;
  max-width: 220px;
}

.lead-company-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-company-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-company-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-company-more {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.lead-company-current {
  font-size: 0.65rem;
  padding: 2px 6px;
  vertical-align: middle;
}

.lead-card-company-block {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--hover-bg-subtle);
  border: 1px solid var(--border-subtle);
}

.lead-card-company-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.lead-detail-page .lead-detail-root {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
}

.lead-profile {
  gap: 20px;
}

.lead-detail-avatar .lead-avatar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  font-size: 1.5rem;
}

.lead-detail-hero .cp-hero-main {
  align-items: flex-start;
}

.lead-detail-hero .cp-subtitle {
  margin: 0;
  font-size: 1rem;
}

.lead-detail-hero .cp-hero-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.lead-detail-linkedin {
  margin-top: 12px;
}

.lead-detail-linkedin .lead-linkedin-icon {
  margin-left: 0;
  padding-left: 0;
}

.lead-detail-hero-aside {
  align-self: stretch;
  width: min(250px, 32%);
  gap: 12px;
}

.lead-detail-hero-aside .lead-skill-technology-tags {
  justify-content: flex-end;
  width: 100%;
}

.lead-detail-hero-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.lead-detail-hero-action--date {
  margin-top: auto;
}

.lead-detail-section {
  margin: 0;
}

.lead-detail-section .cp-panel-section-header {
  margin-bottom: 16px;
}

.lead-detail-section .cp-zone-heading {
  align-items: center;
}

.lead-detail-section .cp-zone-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-size: 20px 20px;
}

.lead-employment-panel .cp-zone-icon--employment {
  background-color: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a5b4fc' stroke-width='1.75'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m-13 5h18m-11 0v2h4v-2'/%3E%3C/svg%3E");
}

.lead-employment-panel {
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border-subtle));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.lead-employment-panel > .cp-panel-section-header {
  margin: 0;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 6%, var(--bg-card)), var(--bg-card) 60%);
}

.lead-detail-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.lead-detail-fetched-at {
  color: var(--text-dim);
  font-size: 0.75rem;
  white-space: nowrap;
}

.lead-detail-hero-action .company-detail-full-link {
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .lead-detail-hero-aside {
    width: 100%;
  }

  .lead-detail-hero-action {
    justify-content: flex-end;
  }
}

.lead-refetch-btn {
  padding: 8px 12px;
  font-size: 0.78rem;
}

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

.cp-hero-actions--social {
  justify-content: flex-start;
}

.cp-hero-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cp-hero-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  width: min(280px, 36%);
  padding-left: 20px;
  border-left: 1px solid var(--border-subtle);
}

.cp-enrich-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text);
}

.cp-enrich-warning-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(245, 158, 11, 0.28);
}

.cp-enrich-warning-body {
  min-width: 0;
}

.cp-enrich-warning-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.cp-enrich-warning-text {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cp-hero-enrich-action {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.cp-hero-refetch {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.cp-hero-sources {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

.cp-hero-technology-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.cp-hero-source-item {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.cp-hero-source-item .cp-diffbot-enrich-btn,
.cp-hero-source-item .company-refetch-btn {
  max-width: 100%;
}

.lead-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-detail-section .lead-skill-technology-tags {
  margin: 0 0 12px;
}

.lead-skill-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.25;
}

.lead-employment-company {
  font-weight: 600;
  color: var(--text);
}

.lead-employment-link {
  margin-top: 4px;
  font-size: 0.82rem;
}

.lead-employment-table-wrap {
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.lead-employment-table {
  min-width: 870px;
  font-size: 0.82rem;
}

.lead-employment-table th {
  padding: 13px 26px;
  color: var(--accent-light);
  background: linear-gradient(
    105deg,
    color-mix(in srgb, var(--accent) 14%, var(--table-head-bg)),
    color-mix(in srgb, var(--cyan) 7%, var(--table-head-bg))
  );
  border-bottom-color: color-mix(in srgb, var(--accent) 24%, var(--border-subtle));
}

.lead-employment-table td {
  padding: 14px 26px;
  line-height: 1.45;
}

.lead-employment-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--hover-bg-subtle));
}

.lead-employment-table tbody tr.lead-employment-row {
  cursor: pointer;
}

.lead-employment-table tbody tr.lead-employment-row--static {
  cursor: default;
}

.lead-employment-table tbody tr.lead-employment-row--static:hover {
  background: transparent;
}

.lead-employment-table tbody tr.lead-employment-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.lead-employment-table .lead-employment-company-cell {
  min-width: 205px;
  border-right: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--accent) 2%, var(--bg-card));
}

.lead-employment-table tbody tr.lead-employment-row:not(.lead-employment-row--static):hover .lead-employment-company-cell {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

.lead-employment-action-cell {
  width: 52px;
  padding-right: 18px !important;
  padding-left: 12px !important;
  text-align: center;
}

.lead-employment-open-company {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--accent-light);
  background: var(--bg-surface);
  transition: var(--transition);
}

.lead-employment-open-company svg {
  width: 16px;
  height: 16px;
}

.lead-employment-open-company:hover {
  color: var(--text);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
}

.lead-employment-open-company:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lead-employment-role {
  min-width: 170px;
  font-weight: 600;
  color: var(--text);
}

.lead-employment-company {
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}

.lead-employment-company-link {
  color: inherit;
  text-decoration: none;
}

.lead-employment-company-link:hover {
  color: var(--accent-light);
}

.lead-employment-company-sub {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.4;
}

.lead-employment-company-actions {
  margin-top: 5px;
  font-size: 0.75rem;
}

.lead-employment-table .lead-company-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.lead-employment-company-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-company-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.lead-company-logo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.lead-company-logo.is-hidden,
.lead-company-logo--initials.is-hidden {
  display: none;
}

.lead-employment-company-meta {
  min-width: 0;
}

/* ── Companies list loading overlay ───────────────────────────── */
.companies-list {
  position: relative;
}

.companies-list-body {
  position: relative;
  min-height: 200px;
}

.companies-list.is-busy .companies-list-body {
  min-height: 220px;
}

.companies-list-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  backdrop-filter: blur(2px);
  border-radius: var(--radius);
}

.companies-list-busy[hidden] {
  display: none !important;
}

.companies-list-busy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  padding: 28px 16px 40px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 94%, transparent) 0%,
    color-mix(in srgb, var(--bg) 75%, transparent) 65%,
    transparent 100%
  );
}

.companies-list-busy-spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.companies-list.is-busy .pagination {
  pointer-events: none;
  opacity: 0.55;
}

.company-fetched-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.company-fetched-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge--sm {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  line-height: 1.3;
}

.company-card-meta .company-fetched-badges {
  width: 100%;
  margin-top: 4px;
}

.data-table .col-fetched {
  min-width: 7.5rem;
}

/* ── Company cards (grid view) ─────────────────────────────────── */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.companies-grid[hidden] {
  display: none !important;
}

.companies-grid-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
}

.companies-grid > .empty-state {
  grid-column: 1 / -1;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  min-width: 0;
  overflow: hidden;
}

.company-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.company-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.company-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}

.company-card-header .company-cell {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}

.company-card-header .score-ring--out-of {
  flex-shrink: 0;
  margin-top: 2px;
}

.company-card-title-block {
  flex: 1;
  min-width: 0;
}

.company-card-title-block .company-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  word-break: break-word;
}

.company-card-title-block .company-domain {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.company-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.company-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0;
}

.company-card-stats div {
  min-width: 0;
}

.company-card-stats dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0 0 2px;
}

.company-card-stats dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-card-approval {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.view-toggle-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-toggle-btn .toolbar-icon,
.company-filters-toggle-label .toolbar-icon {
  flex-shrink: 0;
  color: var(--text);
}

.btn-ghost .toolbar-icon {
  color: inherit;
}

.company-filters-toggle-label .toolbar-icon {
  color: var(--text-muted);
}

.company-filters-toggle:hover .company-filters-toggle-label .toolbar-icon {
  color: var(--text);
}

/* ── Recent activity ─────────────────────────────────────────── */
.recent-section {
  margin-top: 56px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: inherit;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.recent-item:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.recent-item--static,
.recent-item--static:hover {
  cursor: default;
  border-color: var(--border-subtle);
  background: var(--bg-card);
}

.recent-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.recent-info { flex: 1; min-width: 0; }

.recent-info strong {
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-info span {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.recent-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.recent-empty {
  padding: 18px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.recent-empty p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.recent-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.recent-loading p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Empty / Loading states ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}

.company-not-found-state .company-not-found-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 36rem;
  margin: 12px auto 0;
  line-height: 1.55;
}

/* ── Home search — company pick panel (inventory + Linkd) ───── */
.linkd-name-picker,
.company-pick-panel {
  text-align: left;
  padding: 18px 20px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border-subtle));
  border-radius: calc(var(--radius-md) + 2px);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--accent) 5%, var(--bg-card)) 0%, var(--bg-card) 48%),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.company-pick-panel-header {
  margin-bottom: 14px;
}

.company-pick-panel-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.company-pick-panel-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.company-pick-panel-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.company-pick-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-light);
  white-space: nowrap;
}

.company-pick-panel-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.company-pick-panel-hint strong {
  color: var(--text);
  font-weight: 600;
}

.company-pick-outside-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: min(100%, 280px);
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.company-pick-outside-btn-text {
  white-space: nowrap;
}

.company-pick-outside-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.company-pick-outside-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .company-pick-panel-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .company-pick-outside-btn {
    max-width: none;
    width: 100%;
  }

  .company-pick-outside-btn-text {
    white-space: normal;
  }
}

.company-pick-grid,
.linkd-name-picker-list {
  list-style: none;
  margin: 0;
  padding: 2px 2px 4px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  max-height: min(340px, 52vh);
  overflow: auto;
  scrollbar-gutter: stable;
}

.company-pick-grid::-webkit-scrollbar,
.linkd-name-picker-list::-webkit-scrollbar {
  width: 6px;
}

.company-pick-grid::-webkit-scrollbar-thumb,
.linkd-name-picker-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-dim) 35%, transparent);
}

.company-pick-card,
.linkd-name-pick-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--radius-sm) - 1px);
  background: var(--surface-elevated, var(--bg-elevated, var(--bg-card)));
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.company-pick-card:hover,
.linkd-name-pick-row:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-1px);
}

.company-pick-card-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.company-pick-card-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--accent-light);
}

.company-pick-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.company-pick-card-head-text {
  flex: 1;
  min-width: 0;
}

.company-pick-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.company-pick-industry {
  display: -webkit-box;
  margin: 2px 0 0;
  max-width: none;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.hero .company-pick-industry,
.company-pick-panel .company-pick-industry {
  margin: 2px 0 0;
  max-width: none;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.hero .company-pick-card-name,
.company-pick-panel .company-pick-card-name {
  font-size: 0.88rem;
  color: var(--text);
}

.company-pick-linkedin {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--accent-light);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.company-pick-linkedin:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
}

.company-pick-linkedin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.company-pick-card-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: -1px;
  line-height: 0;
}

.company-pick-action-btn,
.linkd-name-pick-enrich-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
  color: var(--accent-light);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.company-pick-action-btn--icon,
.linkd-name-pick-enrich-btn.company-pick-action-btn--icon {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  flex-shrink: 0;
}

.company-pick-action-btn:hover,
.linkd-name-pick-enrich-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-surface));
  color: var(--accent);
  transform: translateY(-1px);
}

.company-pick-action-btn:focus-visible,
.linkd-name-pick-enrich-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .company-pick-grid,
  .linkd-name-picker-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .company-pick-grid,
  .linkd-name-picker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(380px, 58vh);
  }

  .linkd-name-picker,
  .company-pick-panel {
    padding: 16px 14px 14px;
  }
}

@media (max-width: 420px) {
  .company-pick-grid,
  .linkd-name-picker-list {
    grid-template-columns: 1fr;
  }
}

.company-not-found-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.search-results {
  margin-top: 32px;
  display: none;
  max-width: 100%;
  min-width: 0;
}

.search-results.visible { display: block; }

.search-results .leads-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 820px) {
  .search-results .leads-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.search-progress-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0 2px;
}

.search-progress-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: searchProgressIconPulse 2.4s ease-in-out infinite;
}

.search-progress-title-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
}

.search-progress-title-main {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.search-progress-title-sub {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}

.search-progress-timer {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  align-self: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  white-space: nowrap;
}

.search-progress-timer-value {
  letter-spacing: 0.02em;
}

.search-progress-timer-unit {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.72;
  margin-right: 3px;
}

.search-progress-timer-unit:last-child {
  margin-right: 0;
}

.search-progress-timer[data-running="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  animation: searchProgressTimerGlow 2s ease-in-out infinite;
}

.search-progress-title::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  margin-left: 6px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.home-section-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  color: var(--text-secondary, inherit);
}

.search-progress {
  margin-bottom: 20px;
}

.search-progress.is-entering {
  animation: searchProgressIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.search-progress--modal {
  margin-bottom: 0;
}

.search-progress[hidden] {
  display: none;
}

.search-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.search-progress-modal[hidden] {
  display: none;
}

.search-progress-modal-open {
  overflow: hidden;
}

.search-progress-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.55);
  backdrop-filter: blur(4px);
}

.search-progress-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
}

.search-progress-modal-host .search-progress-card {
  box-shadow: var(--shadow);
}

.search-progress-modal.is-busy .search-progress-modal-backdrop {
  cursor: default;
}

.search-progress--modal .search-progress-card {
  position: relative;
}

.search-progress--modal .search-progress-card:has(.search-progress-modal-close) {
  padding-top: 12px;
}

.search-progress--modal .search-progress-card:has(.search-progress-modal-close) .search-progress-toggle {
  margin-top: 10px;
  padding-right: 4px;
}

.search-progress-modal-close {
  position: absolute;
  top: 6px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.search-progress-modal-close:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-progress-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--bg-surface) 42%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset,
    0 10px 28px color-mix(in srgb, var(--text) 4%, transparent);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.search-progress-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--accent) 55%, transparent) 28%,
    color-mix(in srgb, var(--cyan) 70%, transparent) 52%,
    color-mix(in srgb, var(--accent) 45%, transparent) 78%,
    transparent 100%
  );
  background-size: 220% 100%;
  opacity: 0.85;
  pointer-events: none;
}

.search-progress-card:has(.search-progress-timer[data-running="true"])::before {
  animation: searchProgressShimmer 2.2s linear infinite;
}

.search-progress-card:has(.search-progress-timer[data-running="true"]) {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 7%, transparent) inset,
    0 12px 32px color-mix(in srgb, var(--accent) 8%, transparent);
}

.search-progress-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.search-progress-header .search-progress-toggle {
  flex: 1;
  min-width: 0;
}

.search-progress-cancel-btn {
  flex-shrink: 0;
  margin-top: 2px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text-dim) 35%, var(--border-subtle));
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.search-progress-cancel-btn:hover {
  border-color: color-mix(in srgb, #f87171 45%, var(--border-subtle));
  color: #fca5a5;
  background: color-mix(in srgb, #f87171 8%, transparent);
}

.search-progress-cancel-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, #f87171 45%, transparent);
  outline-offset: 2px;
}

.search-progress-cancelled-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, #f87171 16%, transparent);
  color: #fca5a5;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.search-progress-step--cancelled .search-progress-step-marker {
  color: #f87171;
}

.search-progress-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.search-progress-toggle:hover .search-progress-chevron-wrap {
  color: var(--accent-light);
}

.search-progress-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-progress-heading-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-progress-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.search-progress-summary {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.search-progress-card:not(.is-collapsed) .search-progress-summary {
  display: none;
}

.search-progress-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--text-dim);
}

.search-progress-chevron {
  display: block;
  transition: transform 0.2s ease;
}

.search-progress-toggle[aria-expanded="true"] .search-progress-chevron {
  transform: rotate(90deg);
}

.search-progress-body {
  display: none;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
}

.search-progress-body.is-open {
  display: block;
  animation: searchProgressBodyIn 0.32s ease both;
}

.search-progress-card.is-collapsed .search-progress-body {
  display: none;
}

.search-progress-done-icon,
.search-progress-error-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.search-progress-done-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.search-progress-error-icon {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.search-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  --progress-step-pad: 6px;
}

.search-progress-step {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.search-progress-step.is-entering {
  opacity: 0;
  transform: translateY(6px);
}

.search-progress-step.is-entering.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.search-progress-step.is-status-changed .search-progress-step-label {
  animation: searchProgressStepLabelIn 0.34s ease;
}

.search-progress-step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex-shrink: 0;
  padding-top: var(--progress-step-pad);
}

.search-progress-step:not(:last-child) .search-progress-step-rail {
  margin-bottom: calc(-1 * var(--progress-step-pad));
  padding-bottom: var(--progress-step-pad);
}

.search-progress-step-line {
  position: relative;
  flex: 1 1 auto;
  width: 1.5px;
  min-height: 12px;
  margin-top: -1px;
  margin-bottom: -1px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-subtle) 80%, transparent);
  overflow: hidden;
}

.search-progress-step-line::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--green) 55%, #fff) 0%,
    color-mix(in srgb, var(--accent) 45%, var(--cyan)) 100%
  );
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-progress-step:last-child .search-progress-step-line {
  display: none;
}

.search-progress-step--done .search-progress-step-line::after {
  transform: scaleY(1);
}

.search-progress-step.is-completing .search-progress-step-line::after {
  transition-delay: 0.24s;
}

.search-progress-step-marker {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--input-bg) 70%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--border-subtle) 85%, transparent);
  color: color-mix(in srgb, var(--text-dim) 80%, transparent);
  position: relative;
  z-index: 1;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.search-progress-step--active .search-progress-step-marker {
  border-color: color-mix(in srgb, var(--accent) 55%, #fff);
  color: color-mix(in srgb, var(--accent-light) 75%, #fff);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent),
    0 0 10px color-mix(in srgb, var(--accent) 10%, transparent);
  animation: progressPulse 1.4s ease-in-out infinite;
}

.search-progress-step--active.is-activating .search-progress-step-marker {
  opacity: 0.4;
  box-shadow: none;
  animation: searchProgressActivateIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.48s both,
    progressPulse 1.4s ease-in-out 0.98s infinite;
}

.search-progress-step--active.is-activating .search-progress-step-label {
  opacity: 0.45;
  animation: searchProgressActivateLabel 0.45s ease 0.5s both,
    searchProgressLabelShimmer 2.4s ease-in-out 0.95s infinite;
}

.search-progress-step--active .search-progress-step-label {
  background: linear-gradient(
    90deg,
    var(--accent-light) 0%,
    var(--cyan) 45%,
    var(--accent-light) 90%
  );
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: searchProgressLabelShimmer 2.4s ease-in-out infinite;
}

.search-progress-step--done .search-progress-step-marker {
  border-color: color-mix(in srgb, var(--green) 55%, #fff);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: color-mix(in srgb, var(--green) 72%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 8%, transparent);
}

.search-progress-step.is-completing .search-progress-step-marker {
  animation: searchProgressCompleteMorph 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.search-progress-step.is-completing .search-progress-step-label {
  color: color-mix(in srgb, var(--green) 72%, #fff);
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: searchProgressStepLabelIn 0.34s ease;
}

.search-progress-step--error .search-progress-step-marker {
  border-color: color-mix(in srgb, var(--red) 55%, #fff);
  background: color-mix(in srgb, var(--red) 8%, transparent);
  color: color-mix(in srgb, var(--red) 70%, #fff);
}

.search-progress-step-body {
  flex: 1;
  min-width: 0;
  padding: var(--progress-step-pad) 0;
}

.search-progress-step-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
  transition: color 0.28s ease;
}

.search-progress-step--pending .search-progress-step-label {
  color: var(--text-dim);
  font-weight: 500;
}

.search-progress-step-detail {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

@keyframes progressPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.92; }
}

@keyframes searchProgressIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes searchProgressBodyIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes searchProgressStepLabelIn {
  from { opacity: 0.55; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes searchProgressCompleteMorph {
  0% {
    transform: scale(1);
    border-color: color-mix(in srgb, var(--accent) 55%, #fff);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: color-mix(in srgb, var(--accent-light) 75%, #fff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    border-color: color-mix(in srgb, var(--green) 55%, #fff);
    background: color-mix(in srgb, var(--green) 10%, transparent);
    color: color-mix(in srgb, var(--green) 72%, #fff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 8%, transparent);
  }
}

@keyframes searchProgressActivateIn {
  from {
    opacity: 0.35;
    transform: scale(0.86);
    box-shadow: none;
  }
  to {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent),
      0 0 10px color-mix(in srgb, var(--accent) 10%, transparent);
  }
}

@keyframes searchProgressActivateLabel {
  from { opacity: 0.35; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes searchProgressShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes searchProgressLabelShimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

@keyframes searchProgressIconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
  50% { transform: scale(1.04); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--cyan) 45%, transparent); }
}

@keyframes searchProgressTimerGlow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .search-progress.is-entering,
  .search-progress-body.is-open,
  .search-progress-step.is-entering,
  .search-progress-step.is-completing .search-progress-step-marker,
  .search-progress-step.is-completing .search-progress-step-label,
  .search-progress-step.is-activating .search-progress-step-marker,
  .search-progress-step.is-activating .search-progress-step-label,
  .search-progress-step.is-status-changed .search-progress-step-label,
  .search-progress-title-icon,
  .search-progress-timer[data-running="true"],
  .search-progress-card:has(.search-progress-timer[data-running="true"])::before,
  .search-progress-step--active .search-progress-step-marker,
  .search-progress-step--active .search-progress-step-label {
    animation: none !important;
    transition: none !important;
  }

  .search-progress-step.is-entering,
  .search-progress-step--active.is-activating .search-progress-step-marker,
  .search-progress-step--active.is-activating .search-progress-step-label {
    opacity: 1;
    transform: none;
  }

  .search-progress-step-line::after {
    transition: none !important;
  }

  .search-progress-step--active .search-progress-step-label {
    background: none;
    color: var(--accent-light);
    -webkit-text-fill-color: currentColor;
  }
}

/* company lookup result */
.company-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
}

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

.company-detail-header-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.company-detail-full-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
  white-space: nowrap;
}

.company-detail-full-link:hover {
  color: var(--text);
}

.company-detail-full-link svg {
  flex-shrink: 0;
}

.company-detail-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.company-detail-title h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.company-detail-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.company-detail-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.company-detail-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
  line-height: 1.55;
}

.company-detail-placeholder {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.company-detail-placeholder code {
  font-family: ui-monospace, monospace;
  color: var(--accent-light);
}

.company-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.company-detail-field {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

[data-theme="light"] .company-detail-field {
  background: rgba(15, 23, 42, 0.03);
}

.company-detail-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.company-detail-value {
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

.company-detail-value a {
  color: var(--accent-light);
}

.company-detail-insights {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.company-detail-insights p {
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Company profile page ─────────────────────────────────────── */
.company-profile-page {
  max-width: 1100px;
  margin: 0 auto;
}

.company-profile-page.page-content--wide {
  max-width: none;
  width: 100%;
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent-light);
}

.company-profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-dim);
}

.company-profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.company-profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.5;
  pointer-events: none;
}

.company-profile-hero-main {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.company-profile-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  color: var(--accent-light);
}

.company-profile-hero-text {
  min-width: 0;
}

.company-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.company-profile-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.2;
}

.company-profile-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 6px;
  line-height: 1.45;
}

.company-profile-location {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.company-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-profile-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

[data-theme="light"] .company-profile-link-btn {
  background: rgba(15, 23, 42, 0.04);
}

.company-profile-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-1px);
}

.company-profile-link-icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

.company-profile-hero-score {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.company-profile-hero-score .score-ring--out-of {
  width: 72px;
  height: 72px;
}

.company-profile-hero-score .score-ring--out-of .score-ring-value {
  font-size: 1.25rem;
}

.company-profile-hero-score .score-ring--out-of .score-ring-max {
  font-size: 0.7rem;
}

.company-profile-about {
  padding: 20px 24px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.company-profile-insights {
  margin-bottom: 24px;
}

.company-profile-insights > .company-profile-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.company-profile-insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.company-profile-insight-card {
  padding: 18px 20px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.company-profile-insight-card h3 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-light);
  margin-bottom: 10px;
}

.company-profile-insight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.company-profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.company-profile-section {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.company-profile-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.company-profile-section-icon {
  font-size: 1.1rem;
}

.company-profile-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.company-profile-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.company-profile-field {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 12px;
  align-items: start;
}

.company-profile-field dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0;
}

.company-profile-field dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
  line-height: 1.45;
}

.company-profile-field dd a {
  color: var(--accent-light);
}

.company-profile-metadata,
.company-profile-inline-json {
  margin: 0;
  padding: 14px;
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  color: var(--text-muted);
  line-height: 1.5;
}

[data-theme="light"] .company-profile-metadata,
[data-theme="light"] .company-profile-inline-json {
  background: rgba(15, 23, 42, 0.05);
}

.company-profile-error {
  padding: 48px 24px;
}

@media (max-width: 720px) {
  .company-profile-hero {
    flex-direction: column;
    padding: 24px;
  }

  .company-profile-hero-score {
    align-self: flex-end;
  }

  .company-profile-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .company-profile-sections {
    grid-template-columns: 1fr;
  }

  .applied-filters-summary {
    max-width: none;
    justify-content: flex-start;
    text-align: left;
  }

  .company-filters-toggle-end {
    flex-wrap: wrap;
  }

  .applied-filter-chip {
    white-space: normal;
  }
}

/* ── Company profile (detail page) ───────────────────────────── */
.company-profile-page .page-content--wide {
  max-width: 1360px;
}

.cp-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.cp-page-layout--with-nav {
  grid-template-columns: 168px minmax(0, 1fr);
}

.cp-page-main {
  min-width: 0;
}

.cp-section-nav {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  align-self: start;
  padding: 14px 0;
}

.cp-section-nav-title {
  margin: 0 0 10px;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.cp-section-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-section-nav-link {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.cp-section-nav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.cp-section-nav-link.is-active {
  color: var(--accent-light);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.cp-section-target {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cp-profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.cp-section-label {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.cp-panel-section-header {
  margin: 0 0 16px;
  padding: 0;
}

.cp-panel-section-header .cp-zone-heading {
  align-items: center;
}

.cp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 24px;
  align-items: start;
}

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

.cp-body-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.cp-body-aside {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.cp-overview {
  padding: 22px 26px;
}

.cp-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
}

.cp-overview-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--ghost-bg));
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.cp-overview-metric:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

.cp-overview-metric-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.cp-overview-metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.cp-overview-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.cp-overview-value--link {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  width: fit-content;
  transition: var(--transition);
}

.cp-overview-value--link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.cp-hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.cp-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, var(--ambient-1), transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 100%, var(--ambient-2), transparent 50%);
  pointer-events: none;
}

.cp-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px;
}

.cp-hero-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.cp-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.cp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.cp-avatar-initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cp-hero-body {
  flex: 1;
  min-width: 0;
}

.cp-hero-industries {
  flex-shrink: 0;
  width: 100%;
  text-align: right;
}

.cp-hero-industries-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.cp-hero-industry-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cp-hero-industry-tag {
  display: inline-block;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cp-hero-industry-tag:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
  transform: translateX(-2px);
}

.cp-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cp-diffbot-enrich-btn {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.cp-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.cp-subtitle {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cp-hero-summary {
  margin: 10px 0 0;
  max-width: 52rem;
}

.cp-hero-tagline {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cp-specialities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.cp-speciality-feature-tags,
.company-speciality-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-speciality-feature-tags {
  margin: -4px 0 14px;
}

.company-speciality-tags {
  margin-top: 5px;
}

.cp-speciality-tag {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-active-bg);
  color: var(--accent-light);
  font-size: 0.88rem;
  line-height: 1.4;
}

.cp-text-clamp-wrap {
  max-width: 52rem;
}

.cp-text-clamp-wrap.cp-text-clamp-wrap--about {
  max-width: none;
}

.cp-text-clamp-root.cp-text-clamp-body--hero {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cp-text-clamp-root.cp-text-clamp-body--about {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.cp-text-clamp-root.cp-text-clamp-body--about .cp-about-text {
  margin: 0 0 1rem;
  text-indent: 2.5em;
}

.cp-text-clamp-root.cp-text-clamp-body--about .cp-about-text:last-child {
  margin-bottom: 0;
}

.cp-clamp-visible,
.cp-clamp-suffix {
  display: inline;
}

.cp-text-see-more-ellipsis {
  color: inherit;
}

.cp-text-see-more {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  vertical-align: baseline;
}

.cp-text-see-more:hover {
  color: var(--accent-hover, var(--accent));
  text-decoration: underline;
}

.cp-clamp-suffix--below {
  display: block;
  margin-top: 0.65rem;
}

.cp-hero-location {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.cp-social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.cp-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--ghost-bg);
  color: var(--text-muted);
  transition: var(--transition);
}

.cp-social-link svg {
  width: 18px;
  height: 18px;
}

.cp-social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cp-social-link--website:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--hover-bg);
}

.cp-social-link--linkedin {
  color: #0a66c2;
}

.cp-social-link--linkedin:hover {
  background: rgba(10, 102, 194, 0.15);
  border-color: rgba(10, 102, 194, 0.45);
}

.cp-social-link--twitter {
  color: var(--text);
}

[data-theme="light"] .cp-social-link--twitter {
  color: #0f172a;
}

.cp-social-link--twitter:hover {
  background: var(--hover-bg);
  border-color: var(--border);
}

.cp-social-link--facebook {
  color: #1877f2;
}

.cp-social-link--facebook:hover {
  background: rgba(24, 119, 242, 0.12);
  border-color: rgba(24, 119, 242, 0.4);
}

.cp-social-link--crunchbase {
  color: #146aff;
}

.cp-social-link--crunchbase:hover {
  background: rgba(20, 106, 255, 0.12);
  border-color: rgba(20, 106, 255, 0.4);
}

.cp-social-link--wikipedia {
  color: var(--text-muted);
}

.cp-social-link--wikipedia:hover {
  color: var(--text);
  border-color: var(--border);
}

.cp-panel {
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.cp-panel:hover {
  border-color: var(--border);
}

.cp-panel--sticky {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.cp-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.cp-panel-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.cp-lead p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text);
}

.cp-about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cp-about-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  text-indent: 2.5em;
}

/* Related industry peer strip (company detail) */
.cp-same-industry {
  margin-top: 8px;
}

.cp-same-industry-header {
  margin-bottom: 16px;
}

.cp-same-industry-subtitle {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cp-same-industry-track {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.cp-same-industry-card {
  flex: 0 0 188px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
}

.cp-same-industry-card-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.cp-same-industry-card-link:hover .cp-same-industry-card-name {
  color: var(--accent-light);
}

.cp-same-industry-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-same-industry-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-same-industry-avatar-initials {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cp-same-industry-card-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-same-industry-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cp-same-industry-card-actions {
  margin-top: auto;
}

.cp-same-industry-card-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.78rem;
  padding: 6px 10px;
}

.cp-same-industry-muted {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cp-connected-leads-mount {
  min-height: 0;
}

.cp-connected-leads-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cp-connected-leads-header .cp-panel-section-header {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.cp-connected-leads-header .cp-connected-leads-count {
  margin-top: 10px;
}

.cp-connected-leads-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 12px;
}

.cp-connected-leads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-connected-lead-item .lead-avatar {
  flex-shrink: 0;
}

.cp-connected-lead-item .lead-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-connected-lead-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.cp-connected-lead-item:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--ghost-bg-hover);
}

.cp-connected-lead-item:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.cp-connected-lead-body {
  flex: 1;
  min-width: 0;
}

.cp-connected-lead-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.cp-connected-lead-headline,
.cp-connected-lead-role,
.cp-connected-lead-meta {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-connected-lead-role {
  color: var(--accent-light);
  font-weight: 500;
}

.cp-connected-lead-status {
  margin-top: 6px;
}

.cp-connected-lead-chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--text-dim);
  line-height: 1;
}

.cp-connected-leads-empty,
.cp-connected-leads-loading-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cp-connected-leads-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.cp-zone--investments {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.06);
}

.cp-zone-icon--investments {
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234ade80' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' d='M12 3v18M8 7h8M6 11h12M9 15h6'/%3E%3C/svg%3E");
}

.cp-inv-content {
  padding: 20px 22px 24px;
}

.cp-inv-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--ghost-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
}

.cp-inv-total-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.cp-inv-total-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-light);
}

.cp-inv-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.cp-inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cp-inv-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--ghost-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.cp-inv-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: top;
}

.cp-inv-rounds:not(.is-expanded) .cp-inv-row--more {
  display: none;
}

.cp-inv-show-more-bar {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-top: 14px;
}

.cp-inv-show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 16px 0 10px;
  border-radius: 999px;
  border: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #4ade80 12%, var(--bg-card)) 0%,
      color-mix(in srgb, #4ade80 5%, var(--bg-surface)) 100%
    );
  color: color-mix(in srgb, #4ade80 88%, var(--text));
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 2px color-mix(in srgb, #4ade80 10%, transparent),
    0 8px 24px color-mix(in srgb, #4ade80 12%, transparent);
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

.cp-inv-show-more:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #4ade80 18%, var(--bg-card)) 0%,
      color-mix(in srgb, #4ade80 9%, var(--bg-surface)) 100%
    );
  color: var(--text);
  box-shadow:
    0 2px 4px color-mix(in srgb, #4ade80 14%, transparent),
    0 12px 28px color-mix(in srgb, #4ade80 18%, transparent);
}

.cp-inv-show-more:active {
  transform: translateY(0);
}

.cp-inv-show-more-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, #4ade80 18%, transparent);
  color: color-mix(in srgb, #4ade80 92%, var(--text));
  transition:
    background var(--transition),
    transform var(--transition),
    color var(--transition);
}

.cp-inv-show-more:hover .cp-inv-show-more-chevron {
  background: color-mix(in srgb, #4ade80 26%, transparent);
  color: #4ade80;
}

.cp-inv-show-more-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.cp-inv-rounds.is-expanded .cp-inv-show-more-icon {
  transform: rotate(180deg);
}

.cp-inv-show-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: color-mix(in srgb, #4ade80 92%, var(--text));
  background: color-mix(in srgb, #4ade80 14%, var(--bg-card));
}

.cp-inv-show-more-badge[hidden] {
  display: none !important;
}

[data-theme="light"] .cp-inv-show-more {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #22c55e 10%, #fff) 0%,
      color-mix(in srgb, #22c55e 4%, var(--bg-surface)) 100%
    );
  color: #15803d;
}

[data-theme="light"] .cp-inv-show-more:hover {
  color: #166534;
}

.cp-inv-rounds:not(.is-expanded) .cp-inv-row--preview-last td,
.cp-inv-rounds.is-expanded .cp-inv-table tbody tr:last-child td,
.cp-inv-rounds--all-visible .cp-inv-table tbody tr:last-child td {
  border-bottom: none;
}

.cp-inv-table tbody tr:hover {
  background: var(--hover-bg-subtle);
}

.cp-inv-amount {
  font-weight: 600;
  white-space: nowrap;
}

.cp-inv-investors {
  color: var(--text-muted);
  line-height: 1.45;
  min-width: 140px;
}

.cp-inv-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.cp-inv-subtitle {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.cp-inv-investor-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-inv-investor-list li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
}

.cp-stats {
  display: flex;
  flex-wrap: wrap;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cp-stat {
  flex: 1 1 120px;
  padding: 20px 22px;
  border-right: 1px solid var(--border-subtle);
  transition: var(--transition);
  min-width: 0;
}

.cp-stat:last-child {
  border-right: none;
}

.cp-stat:hover {
  background: var(--bg-card-hover);
}

.cp-stat-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cp-stat-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.cp-layout {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 300px);
  gap: 20px;
  align-items: start;
}

.cp-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cp-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cp-panel--aside {
  padding: 20px 22px;
}

.cp-facts-list {
  margin: 0;
}

.cp-fact {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cp-fact:first-child {
  padding-top: 0;
}

.cp-fact:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cp-fact dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.cp-fact-emoji {
  font-size: 0.95rem;
  line-height: 1;
  text-transform: none;
}

.cp-fact dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.cp-fact-link {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  transition: var(--transition);
}

.cp-fact-link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.cp-fact--jump dd {
  cursor: pointer;
}

#company-locations-detail,
#company-investments-detail {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cp-zone--investments.cp-loc-section--focus,
.cp-contact-locations.cp-loc-section--focus {
  animation: cp-loc-focus 2.2s ease;
}

@keyframes cp-loc-focus {
  0%,
  100% {
    box-shadow: none;
  }
  15%,
  55% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 14px;
  }
}

/* Stock & IPO (before contact) */
.cp-stock-ipo {
  margin-top: 20px;
}

.cp-stock-cap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 22px 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.cp-stock-cap-label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}

.cp-stock-cap-label::after {
  content: '·';
  margin-left: 8px;
  color: var(--text-dim);
  opacity: 0.65;
}

.cp-stock-cap-value {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cp-stock-cap:last-child {
  margin-bottom: 22px;
  padding-bottom: 0;
  border-bottom: none;
}

.cp-stock-ipo-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 22px 22px;
}

.cp-stock-ipo-layout--split {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cp-stock-ipo-subtitle {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.cp-ipo-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-ipo-fact {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
}

.cp-ipo-fact dt {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.cp-ipo-fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.cp-stock-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.cp-stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cp-stock-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--ghost-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.cp-stock-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.cp-stock-table tbody tr:last-child td {
  border-bottom: none;
}

.cp-stock-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.cp-stock-symbol {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}

.cp-stock-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cp-stock-status--current {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.cp-stock-status--former {
  color: var(--text-dim);
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .cp-stock-ipo-layout--split {
    grid-template-columns: 1fr;
  }
}

/* Contact footer */
.cp-contact-footer {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  overflow: hidden;
}

.cp-contact-footer-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 0% 100%, var(--ambient-1), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, var(--ambient-2), transparent 50%);
  pointer-events: none;
  opacity: 0.85;
}

.cp-contact-inner {
  position: relative;
  z-index: 1;
  padding: 26px 28px 28px;
}

.cp-contact-inner .cp-panel-section-header {
  margin-bottom: 20px;
}

.cp-contact-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cp-contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.cp-contact-chip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.cp-contact-chip:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cp-contact-chip-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border-subtle));
}

.cp-contact-chip-icon svg {
  width: 20px;
  height: 20px;
}

.cp-contact-chip--phone .cp-contact-chip-icon {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}

.cp-contact-chip-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.cp-contact-chip-value {
  display: block;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.cp-contact-locations {
  margin: 0;
  padding: 0;
  border: none;
}

.cp-contact-locations-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cp-contact-locations-icon {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.28);
}

.cp-contact-locations-icon svg {
  width: 17px;
  height: 17px;
}

.cp-contact-locations-title {
  margin: 0;
  flex: 1;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.cp-contact-locations-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
}

.cp-loc-insights {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--ghost-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border-subtle));
}

.cp-loc-insights-summary {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.cp-loc-insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-loc-insight-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.cp-loc-insight-chip--hq {
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.cp-loc-insight-chip--country {
  color: var(--text);
}

.cp-loc-insight-chip--highlight {
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent);
}

.cp-loc-insight-chip--highlight.cp-loc-insight-chip--city {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: color-mix(in srgb, var(--cyan) 40%, var(--border-subtle));
}

.cp-loc-insight-chip--emphasis {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
}

[data-theme="light"] .cp-loc-insight-chip--emphasis {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.cp-loc-insight-chip--spread {
  color: var(--accent-light);
}

.cp-locations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-loc-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.cp-loc-card:hover {
  border-color: var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.cp-loc-card--primary {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 10%, var(--ghost-bg)) 0%,
    var(--ghost-bg) 100%
  );
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.cp-loc-pin {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
}

.cp-loc-card--primary .cp-loc-pin {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.cp-loc-pin svg {
  width: 22px;
  height: 22px;
}

.cp-loc-body {
  flex: 1;
  min-width: 0;
}

.cp-loc-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  background: var(--chip-active-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}

.cp-loc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cp-loc-address {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
}

.cp-loc-map-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
  background: var(--chip-active-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
  transition: var(--transition);
}

.cp-loc-map-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cp-loc-map-btn svg:last-child {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.cp-loc-map-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.cp-loc-map-btn:hover svg:last-child {
  transform: translateX(2px);
  opacity: 1;
}

@media (max-width: 520px) {
  .cp-loc-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .cp-loc-map-btn {
    margin-left: auto;
  }
}

.cp-dl {
  margin: 0;
}

.cp-dl-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cp-dl-row:last-child {
  border-bottom: none;
}

.cp-dl-row dt {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cp-dl-row dd {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.cp-dl--compact .cp-dl-row {
  grid-template-columns: 1fr;
  gap: 4px;
}

.cp-tag-block + .cp-tag-block {
  margin-top: 16px;
}

.cp-tag-heading {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

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

.cp-tag {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  background: var(--chip-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  transition: var(--transition);
}

.cp-tag:hover {
  border-color: var(--accent);
  background: var(--chip-active-bg);
}

.cp-tag--tech {
  border-color: rgba(6, 182, 212, 0.35);
  color: var(--cyan);
}

/* Relationship zones */
.cp-zone {
  padding: 0;
  overflow: hidden;
}

.cp-zone--people {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.06);
}

.cp-zone--corporate {
  border-color: rgba(6, 182, 212, 0.22);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.06);
}

.cp-zone-header {
  padding: 22px 26px 0;
}

.cp-zone-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cp-zone-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
}

.cp-zone-icon--people {
  background-color: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c084fc' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' d='M16 18v-1a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v1M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 6v-1a3 3 0 0 0-2-2.83M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.cp-zone-icon--corporate {
  background-color: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2322d3ee' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' d='M4 20h16M6 20V8l6-4 6 4v12M10 12h4M10 16h4'/%3E%3C/svg%3E");
}

.cp-zone-icon--about {
  background-color: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fbbf24' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25'/%3E%3C/svg%3E");
}

.cp-zone-icon--connected-leads {
  background-color: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a5b4fc' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' d='M16 18v-1a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v1M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 6v-1a3 3 0 0 0-2-2.83M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.cp-zone-icon--stock-ipo {
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234ade80' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 3v18h18M7 14l3-3 4 4 6-7'/%3E%3C/svg%3E");
}

.cp-zone-icon--contact {
  background-color: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fb7185' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75'/%3E%3C/svg%3E");
}

.cp-zone-icon--scoring {
  background-color: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a5b4fc' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11.48 3.5 13.1 8.1l4.9.4-3.74 3.2 1.14 4.76-4.12-2.5-4.12 2.5 1.14-4.76-3.74-3.2 4.9-.4L11.48 3.5Z'/%3E%3C/svg%3E");
}

.cp-zone-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cp-zone-sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cp-rel-section {
  padding: 0;
  overflow: hidden;
}

.cp-rel-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 16px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}

.cp-rel-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.cp-rel-tab:hover {
  color: var(--text);
  background: var(--hover-bg-subtle);
}

.cp-zone--people .cp-rel-tab.is-active {
  color: var(--text);
  font-weight: 600;
  background: color-mix(in srgb, #a855f7 14%, var(--bg-card));
  border-color: color-mix(in srgb, #a855f7 38%, var(--border));
  box-shadow: 0 1px 0 color-mix(in srgb, #a855f7 20%, transparent);
}

.cp-zone--corporate .cp-rel-tab.is-active {
  color: var(--text);
  font-weight: 600;
  background: color-mix(in srgb, #0891b2 14%, var(--bg-card));
  border-color: color-mix(in srgb, #0891b2 38%, var(--border));
  box-shadow: 0 1px 0 color-mix(in srgb, #0891b2 20%, transparent);
}

.cp-zone--people .cp-rel-tab.is-active .cp-rel-count {
  background: color-mix(in srgb, #a855f7 28%, var(--ghost-bg));
  color: var(--text);
  font-weight: 600;
}

.cp-zone--corporate .cp-rel-tab.is-active .cp-rel-count {
  background: color-mix(in srgb, #0891b2 28%, var(--ghost-bg));
  color: var(--text);
  font-weight: 600;
}

[data-theme="light"] .cp-zone--people .cp-rel-tab.is-active {
  background: #f3e8ff;
  border-color: #c4b5fd;
}

[data-theme="light"] .cp-zone--corporate .cp-rel-tab.is-active {
  background: #ecfeff;
  border-color: #67e8f9;
}

[data-theme="light"] .cp-zone--people .cp-rel-tab.is-active .cp-rel-count {
  background: #e9d5ff;
  color: #5b21b6;
}

[data-theme="light"] .cp-zone--corporate .cp-rel-tab.is-active .cp-rel-count {
  background: #cffafe;
  color: #0e7490;
}

.cp-rel-count {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ghost-bg);
  color: var(--text-dim);
}

.cp-rel-panels {
  padding: 20px 22px 24px;
}

.cp-rel-panel {
  display: none;
  animation: cp-fade-in 0.28s ease;
}

.cp-rel-panel.is-active {
  display: block;
}

@keyframes cp-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cp-rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.cp-rel-grid-wrap--truncated:not(.is-expanded) .cp-rel-card--more {
  display: none;
}

.cp-rel-grid-stage {
  position: relative;
}

.cp-rel-grid-fade {
  display: none;
  pointer-events: none;
}

.cp-rel-grid-wrap--truncated:not(.is-expanded) .cp-rel-grid-fade {
  display: none;
}

.cp-rel-show-more-bar {
  display: flex;
  justify-content: center;
  margin-top: 2px;
  padding-top: 2px;
}

.cp-rel-grid-wrap--truncated:not(.is-expanded) .cp-rel-show-more-bar {
  margin-top: 16px;
  padding-top: 14px;
  position: relative;
  z-index: 1;
}

.cp-rel-show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 16px 0 10px;
  border-radius: 999px;
  border: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--cyan) 10%, var(--bg-card)) 0%,
      color-mix(in srgb, var(--cyan) 4%, var(--bg-surface)) 100%
    );
  color: color-mix(in srgb, var(--cyan) 88%, var(--text));
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--cyan) 10%, transparent),
    0 8px 24px color-mix(in srgb, var(--cyan) 12%, transparent);
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

.cp-rel-show-more[hidden] {
  display: none !important;
}

.cp-rel-show-more:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--cyan) 16%, var(--bg-card)) 0%,
      color-mix(in srgb, var(--cyan) 8%, var(--bg-surface)) 100%
    );
  color: var(--text);
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--cyan) 14%, transparent),
    0 12px 28px color-mix(in srgb, var(--cyan) 18%, transparent);
}

.cp-rel-show-more:active {
  transform: translateY(0);
}

.cp-rel-show-more-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
  color: color-mix(in srgb, var(--cyan) 90%, var(--text));
  transition:
    background var(--transition),
    transform var(--transition),
    color var(--transition);
}

.cp-rel-show-more:hover .cp-rel-show-more-chevron {
  background: color-mix(in srgb, var(--cyan) 24%, transparent);
  color: var(--cyan);
}

.cp-rel-show-more-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.cp-rel-grid-wrap.is-expanded .cp-rel-show-more-icon {
  transform: rotate(180deg);
}

.cp-rel-show-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: color-mix(in srgb, var(--cyan) 92%, var(--text));
  background: color-mix(in srgb, var(--cyan) 14%, var(--bg-card));
}

.cp-rel-show-more-badge[hidden] {
  display: none !important;
}

[data-theme="light"] .cp-rel-show-more {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--cyan) 8%, #fff) 0%,
      color-mix(in srgb, var(--cyan) 3%, var(--bg-surface)) 100%
    );
  color: #0e7490;
}

[data-theme="light"] .cp-rel-show-more:hover {
  color: #155e75;
}

.cp-rel-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  --rel-action-accent: color-mix(in srgb, var(--accent) 72%, var(--cyan));
  --rel-action-fg: color-mix(in srgb, var(--accent-light) 88%, var(--text));
  --rel-action-fg-strong: color-mix(in srgb, var(--accent-light) 90%, var(--cyan));
}

.cp-rel-card--link {
  cursor: pointer;
}

.cp-rel-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cp-rel-card-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--gradient-soft);
  border: 1px solid var(--border-subtle);
  color: var(--accent-light);
}

.cp-rel-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-rel-card-body {
  flex: 1;
  min-width: 0;
}

/* Initials fallback (no logo or broken logo): same look as the company list */
.cp-avatar:has(> .cp-avatar-initials),
.hc-preview-avatar:has(> .hc-preview-avatar-initials),
.cp-same-industry-avatar:has(> .cp-same-industry-avatar-initials),
.cp-rel-card-avatar:has(> .cp-rel-card-initials) {
  background: var(--gradient);
}

.cp-avatar > .cp-avatar-initials,
.hc-preview-avatar > .hc-preview-avatar-initials,
.cp-same-industry-avatar > .cp-same-industry-avatar-initials,
.cp-rel-card-avatar > .cp-rel-card-initials {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  font-weight: 700;
}

.cp-rel-card--people .cp-rel-card-type {
  color: #c084fc;
}

.cp-rel-card--corporate .cp-rel-card-type {
  color: var(--cyan);
}

.cp-rel-card-type {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.cp-rel-card--people:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

.cp-rel-card--corporate:hover {
  border-color: rgba(6, 182, 212, 0.5);
}

.cp-rel-card-name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
}

.cp-rel-card-summary {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cp-rel-card--enrichable .cp-rel-card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.cp-rel-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}

.cp-rel-card-arrow {
  flex-shrink: 0;
  align-self: center;
  font-size: 1.1rem;
  color: var(--text-dim);
  transition: var(--transition);
}

.cp-rel-card--link .cp-rel-card-arrow {
  color: var(--rel-action-fg-strong);
  opacity: 0.88;
}

.cp-rel-card--link:hover .cp-rel-card-arrow {
  color: var(--accent-light);
  opacity: 1;
  transform: translateX(3px);
}

[data-theme="light"] .cp-rel-card--link .cp-rel-card-arrow {
  color: var(--accent-light);
  opacity: 0.72;
}

[data-theme="light"] .cp-rel-card--link:hover .cp-rel-card-arrow {
  opacity: 1;
}

.cp-rel-pull-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--rel-action-accent) 32%, var(--border-subtle));
  background: color-mix(in srgb, var(--rel-action-accent) 10%, var(--bg-surface));
  color: var(--rel-action-fg);
  font-family: var(--font);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--rel-action-accent) 8%, transparent);
}

[data-theme="light"] .cp-rel-pull-btn {
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
  color: var(--accent-light);
}

.cp-rel-pull-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rel-action-accent) 16%, transparent);
  color: var(--rel-action-fg-strong);
}

.cp-rel-pull-btn-icon svg {
  width: 9px;
  height: 9px;
}

.cp-rel-pull-btn-text {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.cp-rel-pull-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--rel-action-accent) 48%, var(--border-subtle));
  background: color-mix(in srgb, var(--rel-action-accent) 16%, var(--bg-surface));
  color: var(--accent-light);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--rel-action-accent) 14%, transparent);
  transform: translateY(-1px);
}

.cp-rel-pull-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cp-rel-pull-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.cp-rel-pull-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.cp-rel-pull-btn.is-loading .cp-rel-pull-btn-icon svg {
  animation: cp-pull-bounce 0.75s ease-in-out infinite;
}

@keyframes cp-pull-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.5px); }
}

.cp-rel-card--enrichable {
  cursor: default;
}

.cp-rel-card--enrichable:hover .cp-rel-pull-btn:not(:disabled) {
  border-color: color-mix(in srgb, var(--rel-action-accent) 44%, var(--border-subtle));
  background: color-mix(in srgb, var(--rel-action-accent) 14%, var(--bg-surface));
}

.kg-preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-card);
}

/* ── Home search — company preview card ─────────────────────── */
.hero .hc-preview,
.hero .hc-preview .hc-preview-shell,
.hero .hc-preview .hc-preview-header,
.hero .hc-preview .hc-preview-hero-main,
.hero .hc-preview .hc-preview-hero-body,
.hero .hc-preview .hc-preview-name,
.hero .hc-preview .cp-hero-summary,
.hero .hc-preview .cp-hero-location,
.hero .hc-preview .hc-preview-ai,
.hero .hc-preview .hc-preview-buyer,
.hero .hc-preview .cp-connected-lead-item,
.hero .hc-preview .cp-connected-lead-body,
.hero .hc-preview .cp-connected-lead-name,
.hero .hc-preview .cp-connected-lead-headline,
.hero .hc-preview .cp-connected-lead-role,
.hero .hc-preview .cp-connected-lead-meta {
  text-align: left;
}

.hero .hc-preview p {
  max-width: none;
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.hero .hc-preview .hc-preview-hero-body .hc-preview-summary {
  margin: 6px 0 0;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.hero .hc-preview .hc-preview-hero-body .cp-hero-tagline.hc-preview-summary {
  color: var(--text);
}

.hero .hc-preview .hc-preview-hero-body .hc-preview-description {
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.hero .hc-preview .cp-connected-lead-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.hero .hc-preview .cp-connected-lead-headline,
.hero .hc-preview .cp-connected-lead-role,
.hero .hc-preview .cp-connected-lead-meta {
  margin-top: 2px;
  font-size: 0.82rem;
}

.hero .hc-preview .cp-connected-lead-headline,
.hero .hc-preview .cp-connected-lead-meta {
  color: var(--text-muted);
}

.hero .hc-preview .cp-connected-lead-role {
  color: var(--accent-light);
  font-weight: 500;
}

.hero .hc-preview .hc-preview-ai-param-reason,
.hero .hc-preview .hc-preview-ai-note-text,
.hero .hc-preview .hc-ai-track-reason,
.hero .hc-preview .hc-ai-empty {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero .hc-preview .hc-ai-guide-formula,
.hero .hc-preview .hc-ai-guide-example,
.hero .hc-preview .hc-ai-guide-bands,
.hero .hc-preview .hc-ai-guide-level,
.hero .hc-preview .hc-ai-guide-row p {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero .hc-preview .hc-ai-prose p,
.hero .hc-preview .hc-ai-bullets li {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--text);
}

.hero .hc-preview .hc-ai-bullets li:last-child {
  margin-bottom: 0;
}

.hc-preview {
  width: 100%;
}

.hc-preview-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, var(--bg-card)) 0%, var(--bg-card) 42%),
    var(--bg-card);
  box-shadow: var(--shadow-glow);
  padding: 22px 24px 20px;
}

/* Let Company/Person fit tooltips escape the rounded shell instead of clipping. */
.hc-preview-shell:has(.hc-ai-fit--tip:hover),
.hc-preview-shell:has(.hc-ai-fit--tip:focus-visible),
.hc-preview-shell:has(.hc-ai-fit--tip:focus-within) {
  overflow: visible;
}

.hc-preview-shell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0.85;
}

.hc-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hc-preview-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.hc-preview-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 12%, transparent);
}

.hc-preview-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hc-preview-avatar-initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-light);
}

.hc-preview-hero-body {
  flex: 1;
  min-width: 0;
}

.hc-preview-aside {
  flex-shrink: 0;
  align-self: flex-start;
}

.hc-preview-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hc-preview-hero-body .hc-preview-summary {
  margin: 6px 0 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hc-preview-hero-body .cp-hero-tagline.hc-preview-summary {
  color: var(--text);
  font-weight: 500;
}

.hc-preview-hero-body .hc-preview-description {
  margin: 4px 0 0;
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.hc-preview-badge {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary, #6366f1);
}

.hc-preview-hero-body .discovery-profile-preview-headline,
.hc-preview-hero-body .discovery-profile-preview-tags,
.hc-preview-hero-body .discovery-profile-preview-info {
  margin-left: 0;
  padding-left: 0;
  text-align: left;
}

.hc-preview-hero-body .discovery-profile-preview-headline {
  margin-top: 4px;
  margin-bottom: 0;
}

.hc-preview-extra {
  padding: 12px 0 0;
}

.hc-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}

.hc-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: var(--text, inherit);
}

.hc-preview-chip-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

.hc-preview-hero-body .hc-preview-location {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.hc-preview-location-icon {
  flex-shrink: 0;
  line-height: 1.45;
}

.hc-preview-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
  width: 100%;
}

.hc-preview-links-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.hc-preview-links-social .cp-social-row {
  margin-top: 0;
  gap: 8px;
  justify-content: flex-start;
}

.hc-preview-links-social .cp-social-link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.hc-preview-links-social .cp-social-link svg {
  width: 16px;
  height: 16px;
}

.hc-preview-industries {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.hc-preview-industries:empty {
  display: none;
}

.hc-preview-industry {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-light);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.hc-preview-divider {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.hc-preview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 0;
  text-align: left;
}

.hc-preview-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.hc-preview-metric-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hc-preview-metric-emoji {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.hc-preview-metric-label {
  display: block;
  margin-bottom: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hc-preview-metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.hc-preview-ai {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hc-preview-ai-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hc-ai-eval {
  position: relative;
  margin-top: 18px;
  padding: 28px 32px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 6%, transparent);
  text-align: left;
}

.hc-ai-eval .hc-ai-tab {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hc-ai-header {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.hc-ai-fits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hc-ai-fit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1;
}

.hc-ai-fit--meter {
  gap: 10px;
  padding: 2px 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hc-ai-fit--meter:hover,
.hc-ai-fit--meter:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.hc-ai-fit-ring {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.hc-ai-fit-ring svg {
  display: block;
  width: 40px;
  height: 40px;
}

.hc-ai-fit-ring-track {
  stroke: color-mix(in srgb, var(--text) 12%, transparent);
}

.hc-ai-fit-ring-value {
  stroke: currentColor;
  transition: stroke-dashoffset 300ms ease-out;
}

.hc-ai-fit-ring .hc-ai-fit-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 0;
}

.hc-ai-fit-ring .hc-ai-fit-value small {
  font-size: 0.58rem;
  margin-left: 1px;
}

.hc-ai-fit-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.hc-ai-fit-kicker,
.hc-ai-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hc-ai-fit--meter .hc-ai-fit-kicker {
  gap: 4px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: inherit;
  opacity: 0.78;
}

.hc-ai-fit-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hc-ai-fit-value small {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hc-ai-fit-tone {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hc-ai-fit-segments {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  width: 72px;
  margin-top: 1px;
}

.hc-ai-fit-seg {
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.hc-ai-fit-seg.is-on {
  background: currentColor;
}

.hc-ai-fit--high,
.hc-ai-fit--hot {
  color: #059669;
}

.hc-ai-fit--high .hc-ai-fit-value,
.hc-ai-fit--high .hc-ai-fit-tone,
.hc-ai-fit--hot .hc-ai-fit-value,
.hc-ai-fit--hot .hc-ai-fit-tone {
  color: #065F46;
}

.hc-ai-fit--mid,
.hc-ai-fit--warm {
  color: #D97706;
}

.hc-ai-fit--mid .hc-ai-fit-value,
.hc-ai-fit--mid .hc-ai-fit-tone,
.hc-ai-fit--warm .hc-ai-fit-value,
.hc-ai-fit--warm .hc-ai-fit-tone {
  color: #78350F;
}

.hc-ai-fit--low,
.hc-ai-fit--cold,
.hc-ai-fit--cool,
.hc-ai-fit--muted {
  color: #64748B;
}

.hc-ai-fit--low .hc-ai-fit-value,
.hc-ai-fit--low .hc-ai-fit-tone,
.hc-ai-fit--cold .hc-ai-fit-value,
.hc-ai-fit--cold .hc-ai-fit-tone,
.hc-ai-fit--cool .hc-ai-fit-value,
.hc-ai-fit--cool .hc-ai-fit-tone,
.hc-ai-fit--muted .hc-ai-fit-value,
.hc-ai-fit--muted .hc-ai-fit-tone {
  color: #334155;
}

.hc-ai-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--ghost-bg);
  gap: 2px;
}

.hc-ai-switch label,
.hc-ai-switch span {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  cursor: pointer;
}

.hc-ai-switch-person--disabled {
  opacity: 0.45;
  cursor: default;
}

.hc-ai-eval:has(.hc-ai-tab-company:checked) .hc-ai-switch-company,
.hc-ai-eval:has(.hc-ai-tab-person:checked) .hc-ai-switch-person {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 8%, transparent);
}

.hc-ai-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.hc-ai-panes {
  position: relative;
}

.hc-ai-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.hc-ai-eval:has(.hc-ai-tab-company:checked) .hc-ai-pane-company,
.hc-ai-eval:has(.hc-ai-tab-person:checked) .hc-ai-pane-person {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.hc-ai-tracks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hc-ai-tracks--compact {
  gap: 20px;
}

.hc-ai-tracks--compact .hc-ai-track {
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.hc-ai-track-top,
.hc-ai-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hc-ai-track-row {
  min-width: 0;
}

.hc-ai-tracks--compact .hc-ai-track-row {
  gap: 12px;
}

.hc-ai-track-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-ai-track-score {
  flex: 0 0 auto;
  min-width: 2.6rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hc-ai-track-bar {
  flex: 0 0 96px;
  width: 96px;
  height: 6px;
  margin-top: 0;
  border-radius: 999px;
  background: var(--score-track);
  overflow: hidden;
}

@media (min-width: 640px) {
  .hc-ai-track-bar {
    flex-basis: 112px;
    width: 112px;
  }
}

.hc-ai-track-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--text-dim);
  will-change: width;
  transition: width 300ms ease-out;
}

.hc-ai-tracks--compact .hc-ai-track-reason,
.hc-ai-tracks--compact .hc-ai-track-reason-list {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hc-ai-track--high .hc-ai-track-score { color: var(--green); }
.hc-ai-track--high .hc-ai-track-bar span { background: var(--green); }
.hc-ai-track--mid .hc-ai-track-score { color: var(--amber); }
.hc-ai-track--mid .hc-ai-track-bar span { background: var(--amber); }
.hc-ai-track--low .hc-ai-track-score { color: var(--red); }
.hc-ai-track--low .hc-ai-track-bar span { background: var(--red); }
.hc-ai-track--muted .hc-ai-track-bar span { background: var(--text-dim); }

.hc-ai-track-reason,
.hc-ai-track-reason-list,
.hc-ai-prose p,
.hc-ai-empty {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hc-ai-track-reason-list {
  padding: 0 0 0 1.1rem;
  list-style: disc;
}

.hc-ai-track-reason-list li {
  margin: 0 0 4px;
}

.hc-ai-track-reason-list li:last-child {
  margin-bottom: 0;
}

.hc-ai-prose p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
}

.hc-ai-bullets ul {
  margin: 10px 0 0;
  padding: 0 0 0 1.15rem;
  list-style: disc;
}

.hc-ai-bullets li {
  margin: 0 0 11px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.hc-ai-bullets li:last-child {
  margin-bottom: 0;
}

.hc-ai-detail {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hc-ai-detail > .hc-ai-prose,
.hc-ai-detail > .hc-ai-tags-block,
.hc-ai-detail > .hc-ai-next-action,
.hc-ai-detail > .hc-ai-bullets {
  margin: 0;
}

.hc-ai-tags-block .hc-ai-tags {
  margin-top: 10px;
  gap: 8px;
}

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

.hc-ai-meta-value {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}

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

.hc-ai-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.hc-ai-track-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.hc-ai-track-weight {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 90%, transparent);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: help;
}

.hc-ai-fit--tip {
  cursor: pointer;
}

.hc-ai-fit--tip:hover,
.hc-ai-fit--tip:focus-visible,
.hc-ai-fit--tip:focus-within {
  z-index: 20;
}

.hc-ai-fit-popover {
  position: absolute;
  top: calc(100% + 8px);
  /* Grow into the card from the left edge of the badge (full-width company
     previews put Company fit on the left; right:0 was clipping off-card). */
  left: 0;
  right: auto;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(22rem, calc(100vw - 24px));
  max-width: min(22rem, calc(100vw - 24px));
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  /* Fully opaque slate — same solid tip as discovery/partition cards. */
  background-color: #0F172A;
  background-image: none;
  color: #F8FAFC;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
  text-align: left;
}

/* Invisible bridge so the cursor can move from badge → tip without closing. */
.hc-ai-fit-popover::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

/* When a second fit badge sits to the right, keep its tip inside the card. */
.hc-ai-fits .hc-ai-fit:last-child:not(:only-child) .hc-ai-fit-popover {
  left: auto;
  right: 0;
}

/* Partition company column is on the right — open tip leftward so it is not clipped. */
.discovery-split-upper--company {
  overflow: visible;
  position: relative;
}

.discovery-split-upper--company:has(.hc-ai-fit--tip:hover),
.discovery-split-upper--company:has(.hc-ai-fit--tip:focus-visible),
.discovery-split-upper--company:has(.hc-ai-fit--tip:focus-within) {
  z-index: 40;
}

.discovery-split-upper--company .hc-ai-fit-popover {
  left: auto;
  right: 0;
  width: min(20rem, calc(100vw - 48px));
  max-width: min(20rem, 46vw);
}

.discovery-unified-card--split:has(.hc-ai-fit--tip:hover),
.discovery-unified-card--split:has(.hc-ai-fit--tip:focus-within) {
  z-index: 5;
  overflow: visible;
}

.hc-ai-fit-popover-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: #F8FAFC;
}

.hc-ai-fit-popover-summary {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  color: #CBD5E1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hc-ai-fit-popover-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.hc-ai-fit-popover-dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #94A3B8;
}

.hc-ai-fit-popover-row--up .hc-ai-fit-popover-dot {
  background: #34D399;
}

.hc-ai-fit-popover-row--down .hc-ai-fit-popover-dot {
  background: #FBBF24;
}

.hc-ai-fit-popover-row-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #94A3B8;
}

.hc-ai-fit-popover-row p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: #E2E8F0;
}

.hc-ai-fit-popover-hint {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 10px;
  line-height: 1.35;
  color: #94A3B8;
}

.hc-ai-fit--tip:hover .hc-ai-fit-popover,
.hc-ai-fit--tip:focus-visible .hc-ai-fit-popover,
.hc-ai-fit--tip:focus-within .hc-ai-fit-popover {
  opacity: 1;
  visibility: visible;
  transform: none;
  background-color: #0F172A;
  pointer-events: auto;
}

.hc-ai-next-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hc-ai-next-action--priority {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
  border-left: 3px solid color-mix(in srgb, var(--accent) 70%, var(--cyan));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 8%, transparent) 0%,
      color-mix(in srgb, var(--cyan) 5%, transparent) 100%
    );
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 8%, transparent);
}

.hc-ai-next-action--priority .hc-ai-kicker {
  color: color-mix(in srgb, var(--accent-light) 70%, var(--cyan));
}

.hc-ai-next-action--priority ul {
  margin-top: 8px;
}

.hc-ai-copy-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hc-ai-copy-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.hc-ai-copy-btn.is-copied {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.hc-ai-guide {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}

.hc-ai-guide summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.hc-ai-guide summary::-webkit-details-marker {
  display: none;
}

.hc-ai-guide summary::after {
  content: ' +';
  color: var(--text-dim);
  font-weight: 500;
}

.hc-ai-guide[open] summary::after {
  content: ' –';
}

.hc-ai-guide-formula,
.hc-ai-guide-example,
.hc-ai-guide-bands,
.hc-ai-guide-row p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hc-ai-guide-formula {
  color: var(--text);
  font-weight: 550;
}

.hc-ai-guide-example {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.5;
}

.hc-ai-guide-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.hc-ai-guide-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.hc-ai-guide-name {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
}

.hc-ai-guide-weight {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hc-ai-guide-more {
  margin: 10px 0 0;
}

.hc-ai-guide-more a {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
}

.hc-ai-guide-more a:hover {
  text-decoration: underline;
}

.td-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.td-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.td-split .td-card {
  min-width: 0;
}

.td-split .td-table {
  font-size: 0.78rem;
}

.td-split .td-table th,
.td-split .td-table td {
  padding: 7px 8px;
}

@media (max-width: 960px) {
  .td-split {
    grid-template-columns: 1fr;
  }
}

.td-card {
  padding: 22px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.td-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 750;
}

.td-card > p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.td-formula {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface));
  color: var(--text) !important;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

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

.td-check {
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text) 3%, var(--bg-surface));
}

.td-check header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.td-check h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.td-check header span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.td-check p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.td-check ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.td-check li {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

.td-check li b {
  display: inline-block;
  min-width: 14px;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.td-example {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface));
}

.td-example h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.td-example h3 em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.td-example > p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

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

.td-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.td-table th,
.td-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.td-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.td-example-sum {
  margin: 12px 0 0 !important;
  color: var(--text) !important;
  font-weight: 600;
}

.hero .hc-preview .hc-ai-guide-more {
  margin: 10px 0 0;
  max-width: none;
}

.hc-ai-guide-levels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}

.hc-ai-guide-level {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, var(--bg-surface));
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.hc-ai-guide-level b {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.hc-ai-guide-level em {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.hc-ai-guide-level.is-current {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-surface));
  color: var(--text);
  font-weight: 550;
}

.hc-ai-eval:has(.hc-ai-tab-company:checked) .hc-ai-guide-person,
.hc-ai-eval:has(.hc-ai-tab-person:checked) .hc-ai-guide-company {
  display: none;
}

.hc-ai-eval .hc-preview-buyer {
  max-width: none;
}

.hc-ai-eval .cp-connected-lead-item {
  background: color-mix(in srgb, var(--text) 3%, var(--bg-surface));
  box-shadow: none;
}

.cp-profile > .hc-ai-eval,
.cp-ai-scoring {
  margin: 0 0 20px;
}

.cp-ai-scoring {
  padding: 22px 26px 24px;
}

.cp-ai-scoring .hc-ai-eval {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 840px) {
  .hc-ai-eval {
    padding: 20px 18px;
  }

  .hc-ai-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .hc-ai-switch {
    align-self: flex-start;
  }
}

.hc-preview-ai-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hc-preview-ai-block-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.hc-preview-ai-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.hc-preview-ai-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hc-preview-ai-ring-caption {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hc-preview-buyer {
  min-width: 0;
  flex: 1 1 280px;
  max-width: 560px;
  text-align: left;
}

.hc-preview-buyer .cp-connected-leads-list {
  gap: 0;
}

.hc-preview-buyer .cp-connected-lead-item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.hc-preview-ai-ring {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
}

.hc-preview-ai-ring-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  line-height: 1;
}

.hc-preview-ai-ring-value {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.hc-preview-ai-ring-max {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-dim);
}

.hc-preview-ai-ring-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.hc-preview-ai-ring--hot {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--bg-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent);
}

.hc-preview-ai-ring--hot .hc-preview-ai-ring-value,
.hc-preview-ai-ring--hot .hc-preview-ai-ring-label {
  color: var(--green);
}

.hc-preview-ai-ring--warm {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, var(--bg-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 16%, transparent);
}

.hc-preview-ai-ring--warm .hc-preview-ai-ring-value,
.hc-preview-ai-ring--warm .hc-preview-ai-ring-label {
  color: var(--amber);
}

.hc-preview-ai-ring--cold {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, var(--bg-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent);
}

.hc-preview-ai-ring--cold .hc-preview-ai-ring-value,
.hc-preview-ai-ring--cold .hc-preview-ai-ring-label {
  color: var(--red);
}

.hc-preview-ai-metrics .hc-preview-ai-metric-value {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.hc-preview-ai-param-score {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.hc-preview-ai-param-score span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hc-preview-ai-param-reason {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
}

.hc-preview-ai-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.hc-preview-ai-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.hc-preview-ai-note-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}

.hc-preview-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}

.hc-preview-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 45%, transparent);
}

.hc-preview-cta svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.hc-preview-cta:hover svg {
  transform: translateX(2px);
}

.hc-preview-cta-mobile {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.hc-preview-cta-mobile .hc-preview-cta {
  width: 100%;
  justify-content: center;
}

@media (max-width: 720px) {
  .hc-preview-shell {
    padding: 18px 16px 16px;
  }

  .hc-preview-header {
    flex-direction: column;
    gap: 0;
  }

  .hc-preview-avatar {
    width: 48px;
    height: 48px;
  }

  .hc-preview-aside {
    display: none;
  }

  .hc-preview-links-row {
    flex-direction: row;
    align-items: center;
  }

  .hc-preview-industries {
    margin-left: auto;
    justify-content: flex-end;
  }

  .hc-preview-cta-mobile {
    display: block;
  }

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

  .hc-preview-ai-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .cp-page-layout--with-nav {
    grid-template-columns: 1fr;
  }

  .cp-section-nav {
    position: sticky;
    top: calc(var(--nav-h) - 1px);
    z-index: 6;
    margin: 0 -4px;
    padding: 10px 0 12px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
  }

  .cp-section-nav-title {
    display: none;
  }

  .cp-section-nav-list {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 0 4px 2px;
    scrollbar-width: none;
  }

  .cp-section-nav-list::-webkit-scrollbar {
    display: none;
  }

  .cp-section-nav-link {
    flex: 0 0 auto;
    border-left: none;
    border-radius: 999px;
    padding: 7px 12px;
    border: 1px solid var(--border-subtle);
    background: var(--ghost-bg);
    white-space: nowrap;
  }

  .cp-section-nav-link.is-active {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
    background: color-mix(in srgb, var(--accent) 12%, var(--ghost-bg));
  }
}

@media (max-width: 900px) {
  .cp-body {
    grid-template-columns: 1fr;
  }

  .cp-body-aside {
    position: static;
    order: 2;
  }

  .cp-body-main {
    order: 1;
  }

  .cp-layout {
    grid-template-columns: 1fr;
  }

  .cp-panel--sticky {
    position: static;
  }

  .cp-stat {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .cp-stat:last-child {
    border-bottom: none;
  }

  .cp-hero-inner {
    flex-direction: column;
    padding: 22px;
  }

  .cp-hero-main {
    flex-direction: column;
    width: 100%;
  }

  .cp-hero-aside {
    width: 100%;
    padding-left: 0;
    padding-top: 20px;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    align-items: stretch;
  }

  .cp-hero-enrich-action {
    justify-content: flex-start;
  }

  .cp-hero-refetch {
    justify-content: flex-end;
  }

  .cp-hero-industries {
    width: 100%;
    text-align: left;
  }

  .cp-hero-industry-tags {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .cp-hero-industry-tag {
    text-align: left;
  }

  .cp-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cp-rel-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.pagination button:hover,
.pagination button.active {
  background: var(--chip-active-bg);
  border-color: var(--border);
  color: var(--accent-light);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.info    { border-color: rgba(99, 102, 241, 0.4); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(20px);
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open { display: flex; }

  .nav-links a { width: 100%; text-align: center; }

  .mobile-menu-btn { display: block; }

  .search-panel {
    max-width: none;
    padding: 4px 0 0;
  }

  .search-mode-tabs {
    width: 100%;
  }

  .search-mode-tab {
    flex: 1;
    text-align: center;
  }

  .search-mode-body--lookup {
    flex-direction: row;
  }

  .search-mode-body:not(.search-mode-body--lookup) {
    flex-direction: column;
  }

  .discovery-trigger {
    width: 100%;
  }

  .discovery-result-badge {
    margin-left: 0;
  }

  .search-row { flex-direction: column; }

  .page-content { padding-left: 16px; padding-right: 16px; }

  .page-content.page-content--wide {
    padding-left: 16px;
    padding-right: 16px;
  }

  .data-table { font-size: 0.8rem; }

  .data-table th,
  .data-table td { padding: 12px 14px; }

  .hide-mobile { display: none; }
}

/* ── Job History ─────────────────────────────────────────────── */
.jh-toolbar {
  margin-bottom: 20px;
}

.jh-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jh-loading,
.jh-empty {
  padding: 48px 24px;
  text-align: center;
}

.jh-loading p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.jh-table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  overflow-x: auto;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 4%, transparent);
}

.jh-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.jh-th {
  position: sticky;
  top: 0;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
  border-bottom: 1px solid var(--border-subtle);
}

.jh-th--chevron { width: 44px; }
.jh-th--status { width: 110px; }
.jh-th:nth-child(2) { width: 24%; }
.jh-th:nth-child(3) { width: 14%; }
.jh-th:nth-child(4) { width: 14%; }
.jh-th:nth-child(6) { width: 15%; }
.jh-th:nth-child(7) { width: 90px; }

.jh-group + .jh-group .jh-row .jh-cell {
  border-top: 1px solid var(--border-subtle);
}

.jh-row {
  cursor: pointer;
  transition: background var(--transition);
}

.jh-row:hover,
.jh-row:focus-visible {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  outline: none;
}

.jh-row:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

.jh-group.is-expanded .jh-row {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.jh-cell {
  padding: 13px 14px;
  vertical-align: middle;
  font-size: 0.84rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.jh-cell--chevron {
  width: 44px;
  padding-right: 0;
  color: var(--text-dim);
}

.jh-chevron {
  display: block;
  transition: transform var(--transition), color var(--transition);
}

.jh-group.is-expanded .jh-chevron {
  transform: rotate(90deg);
  color: var(--accent-light);
}

.jh-cell--muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.jh-cell--num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.jh-cell--name {
  display: table-cell;
}

.jh-cell--name .jh-val {
  display: inline;
}

.jh-kind {
  display: block;
  margin-bottom: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.jh-kind--action {
  color: var(--accent-light);
}

.jh-type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent-light);
  background: color-mix(in srgb, var(--accent) 10%, var(--ghost-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-subtle));
}

.jh-detail-row .jh-detail-cell {
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

.jh-group:not(.is-expanded) .jh-detail-row {
  display: none;
}

.jh-group.is-expanded {
  box-shadow: inset 3px 0 0 var(--accent);
}

.jh-val {
  display: block;
  max-width: 100%;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  word-break: break-word;
}

.jh-val--with-link {
  display: inline;
  max-width: 100%;
  word-break: break-word;
}

.jh-val--with-link .jh-target-open-link {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  margin: 0 0 0 0.2em;
  padding: 0;
  border-radius: 4px;
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.jh-val--with-link .jh-target-open-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.jh-val--with-link .jh-target-open-link svg {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
}

.jh-val--search-input {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
  overflow-wrap: anywhere;
}

.jh-val--input-type {
  font-weight: 500;
  color: var(--accent-light);
}

.jh-val--source-inventory {
  color: var(--accent-light);
}

.jh-val--source-diffbot {
  color: var(--cyan);
}

.jh-val--source-inventory_after_timeout {
  color: var(--amber);
}

.jh-val--source-none {
  color: var(--text-muted);
}

.jh-val--profile-name:not(.jh-val--empty) {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--jh-profile-name);
}

.jh-val--company:not(.jh-val--empty) {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--jh-company-name);
}

.jh-val--output-link {
  text-decoration: none;
}

.jh-val--output-link:hover {
  text-decoration: underline;
}

.jh-val--profile-name.jh-val--with-link:not(.jh-val--empty) .jh-target-open-link,
.jh-val--company.jh-val--with-link:not(.jh-val--empty) .jh-target-open-link {
  color: inherit;
  opacity: 0.85;
}

.jh-val--profile-name.jh-val--with-link:not(.jh-val--empty) .jh-target-open-link:hover,
.jh-val--company.jh-val--with-link:not(.jh-val--empty) .jh-target-open-link:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.jh-val--empty {
  font-size: 0.82rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
}

.jh-card-query {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.jh-card-company {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.jh-card-company--muted {
  font-style: italic;
  opacity: 0.85;
}

.jh-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jh-card-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.jh-card-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.jh-card-duration {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.jh-card-detail {
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--accent) 3%, var(--ghost-bg));
}

.jh-detail {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jh-detail-loading {
  padding: 28px;
  text-align: center;
}

.jh-detail-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jh-flag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

.jh-flag--on {
  color: var(--accent-light);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 10%, var(--ghost-bg));
}

.jh-detail-error-box {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #ef4444 35%, var(--border-subtle));
  background: color-mix(in srgb, #ef4444 8%, var(--bg-card));
}

.jh-detail-error-box p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.jh-detail-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
}

.jh-detail-link:hover {
  text-decoration: underline;
}

.jh-detail-section-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.jh-steps {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.jh-steps .jh-detail-section-title {
  margin-bottom: 10px;
}

.jh-steps .search-progress-steps {
  --progress-step-pad: 6px;
}

.jh-json-block {
  margin: 0;
}

.jh-json {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 280px;
  color: var(--text-muted);
}

.jh-detail-error {
  margin: 0;
  padding: 16px 20px;
  color: #ef4444;
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .jh-table {
    min-width: 780px;
  }
}

/* ── Chatbot (global) ────────────────────────────────────────── */
.chatbot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  max-height: calc(100vh - var(--nav-h) - 16px);
}

.chatbot-launcher,
.chatbot-panel,
.chatbot-form,
.chatbot-icon-btn,
.chatbot-send {
  pointer-events: auto;
}

.chatbot-launcher {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow), 0 8px 24px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.chatbot-launcher:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow), 0 10px 28px rgba(99, 102, 241, 0.4);
}

.chatbot-launcher-icon {
  width: 24px;
  height: 24px;
  grid-area: 1 / 1;
}

.chatbot-launcher-icon--close,
.chatbot.is-open .chatbot-launcher-icon--open {
  display: none;
}

.chatbot.is-open .chatbot-launcher-icon--close {
  display: block;
}

.chatbot-panel {
  width: min(560px, calc(100vw - 40px));
  height: calc(100vh - var(--nav-h) - 108px);
  max-height: 820px;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chatbot-panel[hidden] {
  display: none;
}

.chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--gradient-soft);
}

.chatbot-header-text h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.chatbot-header-text p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chatbot-header-actions {
  display: flex;
  gap: 4px;
}

.chatbot-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--ghost-bg);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.chatbot-icon-btn:hover {
  background: var(--ghost-bg-hover);
  color: var(--text);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chatbot-msg-body {
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chatbot-msg-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.chatbot-msg-text p {
  margin: 0 0 0.65em;
}

.chatbot-msg-text p:last-child {
  margin-bottom: 0;
}

.chatbot-list {
  margin: 0.4em 0 0;
  padding-left: 1.15em;
}

.chatbot-list li + li {
  margin-top: 0.25em;
}

.chatbot-inline-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 1px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  vertical-align: baseline;
}

.chatbot-inline-link:hover {
  background: rgba(99, 102, 241, 0.18);
  text-decoration: none;
}

.chatbot-msg-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chatbot-msg--assistant .chatbot-msg-text {
  background: color-mix(in srgb, var(--chip-bg) 88%, var(--bg-surface));
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 6px;
}

.chatbot-msg--user {
  align-self: flex-end;
  text-align: right;
  max-width: 92%;
}

.chatbot-msg--user .chatbot-msg-text {
  background: var(--chip-active-bg);
  color: var(--text);
  border: 1px solid transparent;
  border-top-right-radius: 6px;
  white-space: pre-wrap;
}

.chatbot-msg-text:empty,
.chatbot-msg-text[hidden] {
  display: none;
}

.chatbot-cards,
.chatbot-cards-slot:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot-cards-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chatbot-card {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.chatbot-card-title {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}

a.chatbot-card-title:hover {
  color: var(--accent);
}

.chatbot-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 8px 0 0;
}

.chatbot-card-meta div {
  min-width: 0;
}

.chatbot-card-meta dt {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chatbot-card-meta dd {
  margin: 1px 0 0;
  font-size: 0.78rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

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

.chatbot-card-open,
.chatbot-card-links .chatbot-inline-link {
  margin: 0;
}

.chatbot-card-open {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
}

.chatbot-card-open:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.chatbot-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chatbot-form {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-surface) 92%, var(--gradient-soft));
}

.chatbot-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chatbot-composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.chatbot-form textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 104px;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.4;
}

.chatbot-form textarea:focus {
  outline: none;
  box-shadow: none;
}

.chatbot-form textarea::placeholder {
  color: var(--text-dim);
}

.chatbot-send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
  transition: transform var(--transition), filter var(--transition);
}

.chatbot-send:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.chatbot-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 1em;
}

.chatbot-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: chatbotDot 1s ease-in-out infinite;
}

.chatbot-dots i:nth-child(2) { animation-delay: 0.15s; }
.chatbot-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatbotDot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

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

@media (max-width: 768px) {
  .chatbot {
    right: 8px;
    bottom: 12px;
    left: 8px;
    align-items: stretch;
  }

  .chatbot-panel {
    width: 100%;
    height: calc(100vh - var(--nav-h) - 84px);
    max-height: none;
    border-radius: 16px;
  }

  .chatbot-launcher {
    align-self: flex-end;
  }

  .toast-container {
    right: 16px;
    bottom: 88px;
  }
}

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, var(--ambient-1), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, var(--ambient-2), transparent 50%),
    var(--bg-deep);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}

.auth-subtitle {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.auth-input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--accent);
}

.auth-submit {
  margin-top: 16px;
  width: 100%;
}

.auth-footer {
  margin: 20px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-footer a {
  color: var(--accent-light);
}

.auth-status {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
  background: var(--ghost-bg);
}

.auth-status--error {
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--red);
}

.auth-status--info {
  border-color: var(--ice-border);
  color: var(--ice);
}

.auth-admin-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.auth-admin-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.auth-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.auth-inline-form--create {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.auth-panel-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.perm-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.perm-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.perm-switch-ui {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--ghost-bg);
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.perm-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.perm-switch input:checked + .perm-switch-ui {
  background: color-mix(in srgb, var(--green) 28%, transparent);
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
}

.perm-switch input:checked + .perm-switch-ui::after {
  transform: translateX(16px);
  background: var(--green);
}

.perm-switch-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 24px;
}

.auth-link-box {
  margin-top: 16px;
}

.auth-link-row {
  display: flex;
  gap: 8px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 32px;
}

#users-table td {
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle);
}

#users-table th {
  border-bottom: 1px solid var(--border-subtle);
}

.users-table-wrap {
  position: relative;
  min-height: 180px;
}

.users-table-wrap.is-busy #users-table {
  pointer-events: none;
  opacity: 0.55;
  filter: saturate(0.85);
}

.users-list-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-deep) 35%, transparent);
  backdrop-filter: blur(1.5px);
}

.users-list-busy[hidden] {
  display: none !important;
}

.users-list-busy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  padding: 28px 16px 40px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg-deep) 88%, transparent) 0%,
    color-mix(in srgb, var(--bg-deep) 55%, transparent) 70%,
    transparent 100%
  );
}

.users-list-busy-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.users-skeleton-bar {
  display: inline-block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ghost-bg) 0%,
    var(--hover-bg) 50%,
    var(--ghost-bg) 100%
  );
  background-size: 200% 100%;
  animation: users-skeleton-shine 1.1s ease-in-out infinite;
}

@keyframes users-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.auth-action-disabled {
  display: inline-flex;
  cursor: not-allowed;
}

.auth-action-disabled .btn {
  pointer-events: none;
  opacity: 0.45;
  filter: grayscale(0.35);
}

.btn-inline-spinner {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: -2px;
}

.btn.is-loading,
.btn[aria-busy='true'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: wait;
}

.auth-row-busy {
  opacity: 0.72;
}

.auth-delete-btn {
  color: var(--red);
}

.auth-delete-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
}

/* ── Themed confirm dialog ──────────────────────────────────── */
.app-confirm-open {
  overflow: hidden;
}

.app-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.app-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.55);
  backdrop-filter: blur(4px);
}

[data-theme='light'] .app-confirm-backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.app-confirm-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  animation: app-confirm-in 0.16s ease-out;
}

@keyframes app-confirm-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app-confirm-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
}

.app-confirm-message {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border: none;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.05);
}

.nav-user-chip {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .auth-inline-form {
    grid-template-columns: 1fr;
  }

  .nav-user-chip {
    display: none;
  }
}

/* ── Discovery split result card (person | company) ── */
.discovery-unified-card--split .discovery-split-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: visible;
  border-radius: inherit;
}

.discovery-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: stretch;
  min-width: 0;
}

.discovery-split-grid--exec {
  grid-template-rows: auto auto auto auto;
}

.discovery-unified-card--split {
  position: relative;
  animation: discoveryIntelEnter 300ms ease-out;
}

@keyframes discoveryIntelEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-unified-card--split {
    animation: none;
  }

  .hc-ai-track-bar span {
    transition: none;
  }
}

.discovery-split-sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 90%, transparent);
  background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.18s ease, padding 0.18s ease, border-color 0.18s ease;
}

.discovery-split-sticky:not(.is-visible) {
  height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  box-shadow: none;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.discovery-split-sticky-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.discovery-split-sticky-name {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discovery-split-sticky .hc-ai-fit {
  flex-shrink: 0;
  transform: scale(0.92);
  transform-origin: right center;
}

.discovery-split-sticky .hc-ai-fit-popover {
  display: none;
}

.discovery-split-divider {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 1px;
  justify-self: center;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--border) 85%, transparent) 12%,
    color-mix(in srgb, var(--border) 85%, transparent) 88%,
    transparent 100%
  );
}

.discovery-split-relation {
  position: relative;
  z-index: 2;
  width: 32px;
  justify-self: center;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}

.discovery-split-relation-rail {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--border) 90%, transparent) 14%,
    color-mix(in srgb, var(--accent) 28%, var(--cyan)) 50%,
    color-mix(in srgb, var(--border) 90%, transparent) 86%,
    transparent 100%
  );
}

/* Compact 32px seam connector — sits in the eyebrow band, clear of logos. */
.discovery-split-relation-icon {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--border) 70%, rgba(15, 23, 42, 0.12));
  background: #fff;
  color: color-mix(in srgb, var(--accent-light) 55%, var(--cyan));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: help;
  outline: none;
}

.discovery-split-relation-icon:hover,
.discovery-split-relation-icon:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--cyan));
  color: color-mix(in srgb, var(--accent) 50%, var(--cyan));
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  transform: translateX(-50%) scale(1.06);
}

.discovery-split-relation-icon svg {
  display: block;
  flex: 0 0 auto;
}

.discovery-split-relation-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 6;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--bg-card, #fff);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
  pointer-events: none;
}

.discovery-split-relation-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-left: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--bg-card, #fff);
  transform: translateX(-50%) rotate(45deg);
}

.discovery-split-relation-icon:hover .discovery-split-relation-tooltip,
.discovery-split-relation-icon:focus-visible .discovery-split-relation-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.discovery-split-upper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px 22px 16px;
  height: 100%;
}

.discovery-split-upper--person {
  grid-column: 1;
  grid-row: 1;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.discovery-split-upper--company {
  grid-column: 3;
  grid-row: 1;
  background: color-mix(in srgb, var(--cyan) 5%, transparent);
}

.discovery-split-signals--person,
.discovery-split-action--person {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.discovery-split-signals--company,
.discovery-split-action--company {
  background: color-mix(in srgb, var(--cyan) 5%, transparent);
}

.discovery-split-nba--person {
  grid-column: 1;
  grid-row: 2;
}

.discovery-split-nba--company {
  grid-column: 3;
  grid-row: 2;
}

.discovery-split-signals--person {
  grid-column: 1;
  grid-row: 3;
}

.discovery-split-signals--company {
  grid-column: 3;
  grid-row: 3;
}

.discovery-split-action--person {
  grid-column: 1;
  grid-row: 4;
}

.discovery-split-action--company {
  grid-column: 3;
  grid-row: 4;
}

.discovery-split-grid:not(.discovery-split-grid--exec) .discovery-split-signals--person {
  grid-row: 2;
}

.discovery-split-grid:not(.discovery-split-grid--exec) .discovery-split-signals--company {
  grid-row: 2;
}

.discovery-split-grid:not(.discovery-split-grid--exec) .discovery-split-action--person {
  grid-row: 3;
}

.discovery-split-grid:not(.discovery-split-grid--exec) .discovery-split-action--company {
  grid-row: 3;
}

.discovery-split-nba {
  min-width: 0;
  padding: 4px 22px 18px;
  background: inherit;
}

.discovery-split-nba--person {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.discovery-split-nba--company {
  background: color-mix(in srgb, var(--cyan) 5%, transparent);
}

.discovery-split-nba--empty {
  min-height: 0;
  padding-bottom: 0;
}

.discovery-split-upper--empty {
  justify-content: flex-start;
}

.discovery-split-pane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.discovery-split-kicker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.discovery-split-kicker {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1;
}

.discovery-employer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  background: color-mix(in srgb, var(--green) 10%, var(--bg-card, #fff));
  color: color-mix(in srgb, var(--green) 72%, var(--text));
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.discovery-employer-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
  flex: 0 0 auto;
}

.discovery-role-authority {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--text) 4%, var(--bg-card, #fff));
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

.discovery-role-authority-sep {
  opacity: 0.55;
}

.discovery-role-authority-detail {
  font-weight: 650;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.discovery-role-authority--high {
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
  background: color-mix(in srgb, var(--green) 10%, var(--bg-card, #fff));
  color: color-mix(in srgb, var(--green) 72%, var(--text));
}

.discovery-role-authority--mid {
  border-color: color-mix(in srgb, var(--amber) 30%, transparent);
  background: color-mix(in srgb, var(--amber) 10%, var(--bg-card, #fff));
  color: color-mix(in srgb, var(--amber) 78%, var(--text));
}

.discovery-role-authority--low {
  border-color: color-mix(in srgb, var(--text-dim) 35%, transparent);
  background: color-mix(in srgb, var(--text) 4%, var(--bg-card, #fff));
  color: var(--text-muted);
}

.discovery-split-pane-top .hc-ai-fit {
  margin: 0;
  flex-shrink: 0;
}

.discovery-split-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
}

.discovery-split-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.discovery-split-avatar .hc-preview-avatar-img,
.discovery-split-avatar .hc-preview-avatar-initials,
.discovery-split-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.discovery-split-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 52px;
}

.discovery-split-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discovery-split-employment {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28em;
  min-height: calc(0.84rem * 1.35);
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.discovery-split-employment--spacer {
  visibility: hidden;
}

.discovery-split-employment-role {
  color: var(--text);
  font-weight: 600;
}

.discovery-split-employment-sep {
  color: var(--text-dim);
  font-weight: 500;
}

.discovery-split-employment-company {
  color: color-mix(in srgb, var(--cyan) 55%, var(--text));
  font-weight: 700;
}

.discovery-split-summary {
  margin: 0;
  min-height: calc(0.9rem * 1.5 * 2);
  max-height: calc(0.9rem * 1.5 * 2);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.discovery-split-tags.discovery-profile-preview-tags {
  margin: 0;
  gap: 8px;
  min-height: calc((0.72rem * 1.2 + 8px + 2px) * 2 + 8px);
  max-height: calc((0.72rem * 1.2 + 8px + 2px) * 2 + 8px);
  overflow: hidden;
  align-content: flex-start;
}

.discovery-split-tags.discovery-split-tags--empty {
  min-height: 0;
  max-height: none;
}

.discovery-split-tags .discovery-profile-preview-tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--gradient-soft);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.discovery-split-facts {
  margin-top: auto;
  margin-bottom: 0;
  min-height: calc(0.9rem * 1.45);
  padding-top: 12px;
}

.discovery-split-facts.discovery-profile-preview-info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: auto;
  align-items: center;
}

.discovery-split-facts .discovery-profile-preview-info-col {
  display: flex;
  align-items: center;
  min-height: calc(0.9rem * 1.45);
  gap: 8px;
}

.discovery-split-facts .discovery-profile-preview-info-item {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  min-height: 0;
  width: 100%;
  align-items: center;
  gap: 8px;
}

.discovery-split-facts .discovery-profile-preview-info-item.discovery-split-fact--empty {
  visibility: hidden;
}

.discovery-split-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.discovery-split-heading-row .discovery-split-name {
  flex: 1 1 auto;
  min-width: 0;
}

.discovery-full-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.discovery-full-link-arrow {
  display: inline-block;
  transform: translate(0, 0);
  transition: transform 160ms ease;
}

.discovery-full-link:hover,
.discovery-full-link:focus-visible {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
  outline: none;
}

.discovery-full-link:hover .discovery-full-link-arrow,
.discovery-full-link:focus-visible .discovery-full-link-arrow,
.discovery-full-link.group:hover .discovery-full-link-arrow,
.discovery-full-link.group:focus-visible .discovery-full-link-arrow {
  transform: translate(0.125rem, -0.125rem);
}

.discovery-full-link--spacer {
  visibility: hidden;
  pointer-events: none;
}

[data-theme="dark"] .discovery-full-link {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}

[data-theme="dark"] .discovery-full-link:hover,
[data-theme="dark"] .discovery-full-link:focus-visible {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.45);
}

.discovery-split-facts .discovery-profile-preview-info-emoji {
  font-size: 0.98rem;
  line-height: 1.45;
}

.discovery-split-facts .discovery-profile-preview-info-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-split-inline-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.discovery-split-inline-link:hover {
  text-decoration: underline;
}

.discovery-split-empty {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.discovery-split-signals,
.discovery-split-action {
  min-width: 0;
  padding: 18px 22px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 85%, transparent);
}

.discovery-split-signals--company {
  padding-bottom: 56px;
}

.discovery-split-action {
  padding-bottom: 24px;
}

.discovery-split-action--company {
  padding-bottom: 56px;
}

.discovery-split-signals .hc-ai-master {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.discovery-split-signals--empty,
.discovery-split-action--empty {
  min-height: 14px;
}

.discovery-split-signals .hc-ai-master,
.discovery-split-action .hc-ai-detail {
  min-width: 0;
}

.discovery-split-action .hc-ai-detail {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.discovery-split-extra {
  margin: 0;
  padding: 0 22px 18px;
  border-top: 1px solid color-mix(in srgb, var(--border-subtle) 85%, transparent);
}

@media (max-width: 820px) {
  .discovery-unified-card--split,
  .discovery-unified-card--split .discovery-split-shell,
  .discovery-split-grid--exec,
  .discovery-split-upper,
  .discovery-split-nba,
  .discovery-split-signals,
  .discovery-split-action {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .discovery-unified-card--split {
    overflow-x: clip;
  }

  .discovery-split-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    width: 100%;
  }

  .discovery-split-divider,
  .discovery-split-relation,
  .discovery-split-upper--person,
  .discovery-split-upper--company,
  .discovery-split-nba--person,
  .discovery-split-nba--company,
  .discovery-split-signals--person,
  .discovery-split-signals--company,
  .discovery-split-action--person,
  .discovery-split-action--company {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .discovery-split-upper--person { order: 1; }
  .discovery-split-nba--person { order: 2; }
  .discovery-split-signals--person { order: 3; }
  .discovery-split-action--person { order: 4; }
  .discovery-split-divider,
  .discovery-split-relation { order: 5; }
  .discovery-split-upper--company { order: 6; }
  .discovery-split-nba--company { order: 7; }
  .discovery-split-signals--company { order: 8; }
  .discovery-split-action--company { order: 9; }

  .discovery-split-sticky {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .discovery-split-nba {
    padding-left: 14px;
    padding-right: 14px;
  }

  .discovery-split-divider:not(.discovery-split-relation) {
    width: auto;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      color-mix(in srgb, var(--border) 85%, transparent) 12%,
      color-mix(in srgb, var(--border) 85%, transparent) 88%,
      transparent 100%
    );
  }

  .discovery-split-relation {
    position: relative;
    width: auto;
    justify-self: stretch;
    min-height: 44px;
    margin: 0;
  }

  .discovery-split-relation-rail {
    top: 50%;
    right: 14px;
    bottom: auto;
    left: 14px;
    width: auto;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(
      90deg,
      transparent 0%,
      color-mix(in srgb, var(--border) 90%, transparent) 14%,
      color-mix(in srgb, var(--accent) 28%, var(--cyan)) 50%,
      color-mix(in srgb, var(--border) 90%, transparent) 86%,
      transparent 100%
    );
  }

  .discovery-split-relation-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .discovery-split-relation-icon:hover,
  .discovery-split-relation-icon:focus-visible {
    transform: translate(-50%, -50%) scale(1.06);
  }

  .discovery-split-relation-tooltip {
    top: auto;
    bottom: calc(100% + 10px);
  }

  .discovery-split-relation-tooltip::before {
    top: auto;
    bottom: -5px;
    transform: translateX(-50%) rotate(225deg);
  }

  .discovery-split-upper,
  .discovery-split-signals,
  .discovery-split-action {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Header: keep fit badge fully on-screen */
  .discovery-split-pane-top {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
  }

  .discovery-split-kicker-row {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .discovery-split-pane-top .hc-ai-fit {
    flex: 0 1 auto;
    max-width: 100%;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .discovery-employer-status {
    letter-spacing: 0.04em;
    white-space: normal;
  }

  /* Let identity / employment wrap cleanly */
  .discovery-split-employment {
    min-height: 0;
    align-items: flex-start;
  }

  .discovery-split-employment-role,
  .discovery-split-employment-company {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .discovery-split-name {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .discovery-split-heading-row {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  /* Relax desktop-aligned clamps so chips/text are not stripped */
  .discovery-split-summary {
    min-height: 0;
    max-height: none;
    -webkit-line-clamp: 4;
    overflow-wrap: anywhere;
  }

  .discovery-split-tags.discovery-profile-preview-tags {
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: visible;
  }

  .discovery-role-authority {
    white-space: normal;
  }

  .discovery-split-facts {
    min-height: 0;
  }

  .discovery-split-facts.discovery-profile-preview-info {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .discovery-split-facts .discovery-profile-preview-info-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
  }

  .discovery-split-facts .discovery-profile-preview-info-item {
    min-height: 0;
  }

  .discovery-split-facts .discovery-profile-preview-info-item.discovery-split-fact--empty {
    display: none;
  }

  .discovery-split-facts .discovery-profile-preview-info-text {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .discovery-split-signals .hc-ai-track-row {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .discovery-split-signals .hc-ai-track-label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .discovery-split-signals .hc-ai-track-bar {
    flex: 0 0 72px;
    width: 72px;
  }
}

@media (max-width: 720px) {
  .hc-ai-eval--embedded {
  margin-top: 16px;
  padding: 20px 22px;
  box-shadow: none;
  background: color-mix(in srgb, var(--text) 2.5%, var(--bg-surface, var(--bg-card)));
}

.hc-ai-eval--embedded .hc-ai-header {
  justify-content: flex-end;
  margin-bottom: 16px;
}

.hc-ai-fit-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  height: 1em;
}

.hc-ai-fit-kicker > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 1em;
}

.hc-ai-fit-icon {
  display: block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  opacity: 0.9;
  /* Person/building glyphs sit low in the 24 viewBox — nudge to cap-height center */
  transform: translateY(-0.08em);
}

.hc-ai-fit--person .hc-ai-fit-icon,
.hc-ai-fit--company .hc-ai-fit-icon {
  color: inherit;
}

.hc-ai-next-action {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent, #0ea5e9) 22%, transparent);
  background: color-mix(in srgb, var(--accent, #0ea5e9) 8%, var(--bg-surface, var(--bg-card)));
}

.hc-ai-next-action .hc-ai-kicker {
  color: color-mix(in srgb, var(--accent, #0ea5e9) 70%, var(--text));
}

.hc-ai-next-action ul {
  margin-top: 6px;
}

.hc-ai-next-action li {
  font-weight: 600;
}

@media (max-width: 720px) {
  .discovery-unified-person-aside,
  .discovery-unified-company-aside {
    align-items: stretch;
    width: 100%;
    max-width: none;
  }

  .discovery-unified-person-aside .hc-ai-fit,
  .discovery-unified-company-aside .hc-ai-fit {
    width: 100%;
    max-width: none;
  }

  .discovery-unified-person-aside .hc-preview-cta,
  .discovery-unified-company-aside .hc-preview-cta {
    justify-content: center;
  }

  .discovery-unified-company-connector::before {
    margin-left: 10px;
  }

  .discovery-unified-company-card {
    padding: 14px;
  }

  .hc-ai-eval--embedded {
    padding: 16px;
  }
}

/* —— Fit report (dedicated Person / Company score page) —— */
.fit-report-page {
  padding-bottom: 48px;
}

.fit-report-root {
  max-width: 1180px;
  margin: 0 auto;
}

.fit-report-back {
  margin-bottom: 18px;
}

.fit-report-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.fit-report-breadcrumb {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fit-report-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.fit-report-topbar-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.fit-report-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--ghost-bg);
  gap: 2px;
  position: relative;
}

.fit-report-tab {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fit-report-switch label {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-muted);
  cursor: pointer;
}

.fit-report-switch label.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.fit-report-root:has(.fit-report-tab-company:checked) .fit-report-switch-company,
.fit-report-root:has(.fit-report-tab-person:checked) .fit-report-switch-person {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 8%, transparent);
}

.fit-report-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 22px;
  align-items: start;
}

.fit-report-pane {
  display: none;
}

.fit-report-root:has(.fit-report-tab-person:checked) .fit-report-pane-person,
.fit-report-root:has(.fit-report-tab-company:checked) .fit-report-pane-company {
  display: block;
}

.fit-report-panel,
.fit-report-score {
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  background: var(--bg-card);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 4%, transparent);
}

.fit-report-panel-header h2,
.fit-report-score-section h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text);
}

.fit-report-panel-header p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.fit-report-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
}

.fit-report-identity-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--text);
}

.fit-report-headline {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.fit-report-company-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.fit-report-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 18px;
}

.fit-report-fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fit-report-fact-label,
.fit-report-metric-label {
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fit-report-fact-value,
.fit-report-metric-value {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fit-report-block {
  margin-top: 18px;
}

.fit-report-block h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fit-report-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fit-report-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip-bg, color-mix(in srgb, var(--text) 5%, transparent));
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.fit-report-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--text) 7%, transparent);
}

.fit-report-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fit-report-secondary-link {
  display: inline-flex;
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--accent-light, var(--accent));
  text-decoration: none;
}

.fit-report-secondary-link:hover {
  color: var(--accent);
}

.fit-report-score-header {
  margin-bottom: 18px;
}

.fit-report-score-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fit-report-score-value {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.fit-report-score-value small {
  font-size: 0.42em;
  font-weight: 700;
  color: var(--text-dim);
}

.fit-report-score-value--hot { color: var(--green); }
.fit-report-score-value--warm { color: var(--amber); }
.fit-report-score-value--cold,
.fit-report-score-value--low { color: var(--red); }

.fit-report-score-tone {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fit-report-score-tone--hot {
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green);
}

.fit-report-score-tone--warm {
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  color: var(--amber);
}

.fit-report-score-tone--cold,
.fit-report-score-tone--low {
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red);
}

.fit-report-score-summary {
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

.fit-report-score .hc-ai-next-action {
  margin-bottom: 18px;
}

.fit-report-score-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--text) 7%, transparent);
}

.fit-report-score-section h3 {
  margin-bottom: 12px;
}

.fit-report-score-context {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fit-report-score .hc-ai-guide {
  margin-top: 20px;
}

@media (max-width: 960px) {
  .fit-report-layout {
    grid-template-columns: 1fr;
  }

  .fit-report-topbar-aside {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .fit-report-panel,
  .fit-report-score {
    padding: 18px 16px;
  }

  .fit-report-facts {
    grid-template-columns: 1fr;
  }
}
