:root {
  --bg: #f3efe5;
  --bg-deep: #dbe9df;
  --panel: rgba(255,255,255,0.74);
  --panel-strong: rgba(255,255,255,0.9);
  --text: #10211c;
  --muted: #5e7268;
  --line: rgba(16,33,28,0.11);
  --accent: #0a6c58;
  --accent-2: #d18a2f;
  --danger: #a5483f;
  --shadow: 0 20px 50px rgba(20, 28, 24, 0.08);
}
* { box-sizing: border-box; }
html, body, #root { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(209,138,47,0.18), transparent 25%),
    radial-gradient(circle at bottom right, rgba(10,108,88,0.16), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.shell {
  min-height: 100vh;
  padding: 20px;
}
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-card, .workspace, .lead-card, .drawer-card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  inset: auto -30px -30px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(10,108,88,0.18), transparent 65%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(10,108,88,0.08);
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.hero h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
}
.hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}
.metric-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.metric-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
}
.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1.1fr) 500px;
  gap: 0;
  overflow: hidden;
  min-height: calc(100vh - 190px);
}
.sidebar, .results, .drawer {
  padding: 22px;
}
.sidebar {
  border-right: 1px solid var(--line);
}
.results {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.16));
}
.drawer {
  background: rgba(255,255,255,0.54);
  overflow-x: hidden;
}
.section-title {
  margin: 0 0 4px;
  font-size: 22px;
}
.section-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 15px;
  background: rgba(255,255,255,0.88);
  color: var(--text);
}
.textarea {
  min-height: 118px;
  resize: vertical;
}
.primary-btn, .secondary-btn, .ghost-btn, .mini-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .mini-btn:hover {
  transform: translateY(-1px);
}
.primary-btn, .secondary-btn, .ghost-btn {
  width: 100%;
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 700;
}
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--accent), #179174);
}
.secondary-btn {
  color: #7a4e16;
  background: linear-gradient(135deg, rgba(209,138,47,0.2), rgba(209,138,47,0.12));
  border: 1px solid rgba(209,138,47,0.2);
  margin-top: 10px;
}
.ghost-btn {
  color: var(--accent);
  background: rgba(10,108,88,0.08);
  border: 1px solid rgba(10,108,88,0.14);
}
.status {
  margin-top: 14px;
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}
.results-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar-pill {
  flex: 1 1 120px;
}
.toolbar-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mini-field {
  flex: 1 1 160px;
}
.lead-list {
  display: grid;
  gap: 14px;
}
.lead-card {
  padding: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.lead-card.active {
  border-color: rgba(10,108,88,0.34);
  box-shadow: inset 0 0 0 1px rgba(10,108,88,0.18), var(--shadow);
}
.lead-card:hover { transform: translateY(-1px); }
.lead-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.lead-top > div:first-child {
  min-width: 0;
}
.lead-company {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}
.lead-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.score-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10,108,88,0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.summary {
  margin: 14px 0;
  color: #24372f;
  line-height: 1.6;
}
.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  border: 1px solid var(--line);
}
.detail-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-value {
  margin-top: 8px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(209,138,47,0.14);
  color: #7a4e16;
  font-size: 12px;
}
.drawer-card {
  padding: 20px;
  margin-bottom: 14px;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.drawer-head > div:first-child {
  min-width: 0;
}
.drawer-title {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.drawer-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-btn {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(10,108,88,0.08);
  color: var(--accent);
  border: 1px solid rgba(10,108,88,0.14);
  font-weight: 700;
}
.mini-btn.warm {
  background: rgba(209,138,47,0.12);
  color: #7a4e16;
  border-color: rgba(209,138,47,0.16);
}
.copybox {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.drawer-section {
  margin-top: 14px;
}
.drawer-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
  padding: 24px;
}
.empty-state h3 {
  margin: 0 0 8px;
  font-size: 26px;
}
.empty-state p {
  margin: 0;
  max-width: 340px;
  line-height: 1.6;
  color: var(--muted);
}
.anchor {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.anchor:hover { text-decoration: underline; }
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(209,138,47,0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(10,108,88,0.2), transparent 30%),
    rgba(9, 22, 18, 0.42);
  backdrop-filter: blur(18px);
}
.loader-shell {
  position: relative;
  width: min(820px, 100%);
  padding: 34px;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,249,246,0.88));
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 40px 120px rgba(7, 20, 16, 0.28);
}
.loader-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(10,108,88,0.18), transparent 62%);
  pointer-events: none;
}
.loader-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(10,108,88,0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.loader-title {
  margin: 18px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.loader-slogan {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  min-height: 54px;
}
.loader-pulse-row {
  margin: 28px 0 24px;
}
.loader-pulse-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(16,33,28,0.08);
}
.loader-pulse-bar span {
  position: absolute;
  inset: 0;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(10,108,88,0.2), rgba(10,108,88,0.9), rgba(209,138,47,0.9));
  animation: pulseTravel 2.2s ease-in-out infinite;
}
.loader-pulse-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.loader-stage-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
}
.loader-stage-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.loader-stage-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
}
.loader-stage-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}
.loader-notes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.loader-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(16,33,28,0.08);
  color: var(--text);
  line-height: 1.6;
}
.loader-note-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #27a586);
  box-shadow: 0 0 12px rgba(10,108,88,0.32);
}
.loader-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
@keyframes pulseTravel {
  0% { transform: translateX(-100%); opacity: 0.4; }
  50% { transform: translateX(80%); opacity: 1; }
  100% { transform: translateX(190%); opacity: 0.4; }
}
@media (max-width: 1380px) {
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .drawer {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
  .results {
    border-right: 0;
  }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar, .results, .drawer { border: 0; }
  .sidebar { border-bottom: 1px solid var(--line); }
  .results { border-bottom: 1px solid var(--line); }
  .dual-grid { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loader-shell { padding: 24px; }
  .loader-footer { flex-direction: column; }
}
