.nav { cursor: pointer; background: transparent; color: rgba(255,255,255,.72); margin-bottom: 6px; }
.nav:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav.active { background: rgba(255,255,255,.12); color: #fff; }

.module-view.hidden { display: none !important; }

.targeting-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 24px;
}
.targeting-head h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: .98;
  letter-spacing: -0.055em;
}
.targeting-head p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.targeting-filter-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,253,248,.72);
  padding: 14px;
  margin-bottom: 18px;
}
.primary-target-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--soft);
}
.target-filter-chip {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: #49453f;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.target-filter-chip:hover { border-color: #bdb4a8; }
.target-filter-chip.active { background: var(--ink); color: white; border-color: var(--ink); }

.secondary-target-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(135px, .75fr)) auto;
  gap: 8px;
  padding-top: 13px;
}
.secondary-target-filters input,
.secondary-target-filters select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  font-size: 12px;
  outline: none;
}
.secondary-target-filters input:focus,
.secondary-target-filters select:focus { border-color: #9c9284; box-shadow: 0 0 0 3px rgba(17,17,15,.05); }
.clear-target-filters {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.clear-target-filters:hover { color: var(--ink); }

.target-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 12px;
}
.target-list-head h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.target-result-count { color: var(--muted); font-size: 12px; font-weight: 700; }

.target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.target-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  padding: 18px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(47,40,31,.03);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.target-card:hover,
.target-card:focus-visible {
  transform: translateY(-2px);
  border-color: #c6bcae;
  box-shadow: 0 14px 34px rgba(47,40,31,.075);
  outline: none;
}
.target-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.target-type {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #171713;
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .01em;
}
.target-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  border-radius: 10px;
  background: #f1ede7;
  font-size: 11px;
  font-weight: 800;
}
.target-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.target-location {
  padding: 10px 11px;
  margin-bottom: 11px;
  border: 1px solid #e8e0d5;
  border-radius: 11px;
  background: #faf6ef;
}
.target-location span,
.target-source span,
.target-person span,
.profile-callout span {
  display: block;
  margin-bottom: 4px;
  color: #9a9287;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 8px;
  font-weight: 800;
}
.target-location strong { font-size: 12px; line-height: 1.4; }
.target-meta-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; }
.target-meta-row span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f4f0e9;
  color: #5e5850;
  font-size: 10px;
  font-weight: 600;
}
.target-source { color: #625c54; font-size: 11px; line-height: 1.45; margin-bottom: 12px; }
.target-person {
  padding-top: 11px;
  border-top: 1px solid var(--soft);
  margin-bottom: 10px;
}
.target-person strong { display: block; font-size: 12px; }
.target-person small { color: var(--muted); font-size: 10px; }
.target-reason {
  margin: 0 0 14px;
  color: #575148;
  font-size: 11px;
  line-height: 1.55;
}
.target-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--soft);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.target-card-footer > div { min-width: 0; }
.funding-state { display: block; color: #49443d; font-size: 10px; font-weight: 800; }
.target-card-footer small { display: block; margin-top: 3px; color: #9a9287; font-size: 9px; }
.target-list-action {
  flex: 0 0 auto;
  border: 1px solid #1b1b17;
  background: #1b1b17;
  color: white;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.target-list-action:hover { opacity: .86; }
.target-list-action.is-added { background: #fffdf8; color: #1b1b17; border-color: #cfc6b9; }
.target-empty {
  grid-column: 1 / -1;
  border: 1px dashed #cfc6b9;
  border-radius: 16px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.35);
}

.target-profile {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17,17,15,.38);
  display: flex;
  justify-content: flex-end;
  padding: 14px;
}
.target-profile.hidden { display: none !important; }
.target-profile-panel {
  width: min(760px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid #ded7cc;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: -18px 0 60px rgba(0,0,0,.16);
  padding: 18px;
}
.profile-close {
  margin-left: auto;
  display: block;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 2px 20px;
}
.profile-label { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 800; }
.profile-hero h2 { margin: 5px 0 6px; font-size: 32px; line-height: 1; letter-spacing: -.05em; }
.profile-location { color: #635d54; font-size: 13px; font-weight: 600; }
.profile-score {
  flex: 0 0 auto;
  min-width: 90px;
  border-radius: 16px;
  padding: 13px;
  background: #171713;
  color: white;
  text-align: center;
}
.profile-score span { display: block; opacity: .65; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.profile-score strong { display: block; margin-top: 4px; font-size: 25px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.profile-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  padding: 16px;
}
.profile-panel h3 { margin: 0 0 13px; font-size: 13px; letter-spacing: -.02em; }
.profile-panel p { color: #5d574f; font-size: 11px; line-height: 1.6; }
.profile-panel dl { margin: 0; }
.profile-panel dl > div { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0ebe4; }
.profile-panel dl > div:last-child { border-bottom: 0; }
.profile-panel dt { color: #9a9287; font-size: 9px; font-weight: 700; }
.profile-panel dd { margin: 0; color: #36322d; font-size: 11px; overflow-wrap: anywhere; }
.profile-panel a { color: var(--ink); font-weight: 700; }
.profile-callout { margin-top: 10px; border-radius: 10px; padding: 10px; background: #f4f0e9; color: #4f4942; font-size: 10px; line-height: 1.5; }
.profile-note { margin-top: 12px !important; color: #8a8176 !important; font-size: 9px !important; }
.profile-actions { display: flex; justify-content: flex-end; padding: 14px 0 2px; }
.profile-open { overflow: hidden; }
.muted { color: #9a9287; }

@media (max-width: 1250px) {
  .secondary-target-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .target-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .targeting-head { flex-direction: column; align-items: flex-start; }
  .secondary-target-filters { grid-template-columns: 1fr; }
  .target-grid { grid-template-columns: 1fr; }
  .target-card { min-height: 0; }
  .target-card-footer { align-items: stretch; flex-direction: column; }
  .target-list-action { width: 100%; }
  .target-profile { padding: 0; }
  .target-profile-panel { width: 100%; height: 100vh; border-radius: 0; border: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-hero { align-items: stretch; flex-direction: column; }
  .profile-score { width: 100%; }
}