/* ─── Spec dashboard — dark / pink / minimal (Linear-style) ───────────── */
:root {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface-2:   #161616;
  --surface-3:   #1c1c1c;
  --border:      #232323;
  --border-soft: #1a1a1a;
  --text:        #fafafa;
  --text-dim:    #a1a1aa;
  --text-faint:  #71717a;
  --accent:      #f0c34a;
  --accent-2:    #e3b341;
  --accent-soft: rgba(240, 195, 74, 0.14);
  --accent-line: rgba(240, 195, 74, 0.38);
  --royal:       #3a7bd5;
  --royal-soft:  rgba(58, 123, 213, 0.14);
  --green:       #4ade80;
  --green-soft:  rgba(74, 222, 128, 0.12);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251, 191, 36, 0.12);
  --red:         #f87171;
  --red-soft:    rgba(248, 113, 113, 0.12);
  --blue:        #60a5fa;
  --blue-soft:   rgba(96, 165, 250, 0.12);
  --purple:      #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.12);
  --cyan:        #67e8f9;
  --cyan-soft:   rgba(103, 232, 249, 0.12);
  --radius:      10px;
  --shadow:      0 1px 0 rgba(255,255,255,0.04) inset, 0 0 0 1px var(--border);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Geist', 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
code, pre, .mono { font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', 'Menlo', monospace; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }

::selection { background: var(--accent-soft); color: var(--text); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ─── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: contain;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.brand-word {
  font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', monospace;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-top: 1px;
}
.topbar-spacer { flex: 1; }
.top-btn {
  background: var(--accent); color: #0a1428;
  border-radius: 7px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.1px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.top-btn:hover { filter: brightness(1.08); }
.top-btn:active { transform: translateY(1px); }
.top-btn.ghost {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.top-btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: #2e2e2e; }

.usage-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
  margin-right: 8px;
  cursor: pointer;
  user-select: none;
}
.usage-indicator:hover { background: var(--surface-2); }
.usage-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.usage-value { color: var(--accent); font-weight: 600; }
.usage-sep { color: var(--muted); opacity: 0.5; }

.lead-cost-panel {
  display: flex; flex-direction: column; gap: 4px;
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
}
.lead-cost-panel .top-row {
  display: flex; align-items: baseline; gap: 8px; justify-content: space-between;
}
.lead-cost-panel .cost-total { color: var(--accent); font-weight: 700; font-size: 16px; }
.lead-cost-panel .cost-tokens { color: var(--muted); font-size: 11px; }
.lead-cost-panel .by-stage {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 4px 16px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.lead-cost-panel .by-stage .stage-name { color: var(--text); }
.lead-cost-panel .by-stage .stage-cost { color: var(--accent); text-align: right; }
.lead-cost-panel .by-stage .stage-calls { text-align: right; }

.critique-panel {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 0 16px 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}
.critique-head {
  display: flex; align-items: baseline; gap: 10px; justify-content: space-between;
}
.critique-score { font-weight: 700; font-size: 18px; font-family: 'SF Mono', Menlo, monospace; }
.critique-score.good { color: #4ade80; }
.critique-score.mid  { color: #facc15; }
.critique-score.bad  { color: #f87171; }
.critique-meta {
  color: var(--muted);
  font-size: 11px;
  font-family: 'SF Mono', Menlo, monospace;
}
.critique-section { margin-top: 4px; }
.critique-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  margin-bottom: 4px;
}
.critique-list {
  margin: 0; padding-left: 16px;
  color: var(--text);
  font-size: 12px; line-height: 1.55;
}
.critique-list li { margin-bottom: 2px; }

/* ─── Main layout ─────────────────────────────────────────────────────── */
main {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: calc(100vh - 77px);
}

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.sidebar-top {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-top .label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.niche-select, .stage-filter {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}
.niche-select:focus, .stage-filter:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.niche-select option, .stage-filter option { background: var(--surface); color: var(--text); }
.lead-search {
  width: 100%;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px 9px 32px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  font-family: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.lead-search::placeholder { color: var(--muted); }
.lead-search:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lead-search::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Pipeline stats — colored chips, visually scannable */
.pipeline {
  display: flex; gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pipe-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 99px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.pipe-chip .n { font-weight: 700; color: var(--text); }
.pipe-chip.has-email { background: var(--blue-soft); color: var(--blue); border-color: rgba(96,165,250,0.18); }
.pipe-chip.has-email .n { color: var(--blue); }
.pipe-chip.enriched { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(103,232,249,0.18); }
.pipe-chip.enriched .n { color: var(--cyan); }
.pipe-chip.kept { background: var(--green-soft); color: var(--green); border-color: rgba(74,222,128,0.18); }
.pipe-chip.kept .n { color: var(--green); }
.pipe-chip.built { background: var(--amber-soft); color: var(--amber); border-color: rgba(251,191,36,0.18); }
.pipe-chip.built .n { color: var(--amber); }
.pipe-chip.live { background: var(--green-soft); color: var(--green); border-color: rgba(74,222,128,0.22); }
.pipe-chip.live .n { color: var(--green); }

.stage-filter-wrap { padding: 12px 22px; border-bottom: 1px solid var(--border-soft); }

/* ─── Pending banner ──────────────────────────────────────────────────── */
.pending-banner {
  margin: 14px 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.pending-banner .txt {
  font-size: 12px; color: var(--text-dim);
}
.pending-banner .txt strong { color: var(--text); font-weight: 600; }
.pending-banner button {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 6px; padding: 7px 12px;
  font-size: 12px; font-weight: 600;
  align-self: flex-start;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pending-banner button:hover { background: var(--accent-soft); border-color: var(--accent); }
.pending-banner.live button {
  background: var(--accent); color: #0a1428; border-color: var(--accent);
}
.pending-banner.live button:hover { filter: brightness(1.08); background: var(--accent); }
.pending-banner .empty-bin-btn {
  background: var(--red);
  color: #1a0000;
}
.pending-banner .empty-bin-btn:hover { filter: brightness(1.08); }

/* ─── Lead list ──────────────────────────────────────────────────────── */
.lead-list { flex: 1; overflow-y: auto; padding: 8px 0; }

.lead-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  cursor: pointer;
  border-left: 2px solid transparent;
  position: relative;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.lead-row:hover { background: var(--surface); }
.lead-row.active {
  background: var(--surface);
  border-left-color: var(--accent);
}

/* avatar (logo or initial) */
.avatar {
  width: 40px; height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.lead-thumb {
  width: 100px; height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.lead-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lead-thumb.is-broken { position: relative; border-color: rgba(248,113,113,0.55); box-shadow: 0 0 0 1px rgba(248,113,113,0.25); }
.lead-thumb .thumb-warn {
  position: absolute; top: 3px; right: 3px;
  width: 16px; height: 16px; border-radius: 4px;
  background: rgba(248,113,113,0.9); color: #0a0a0a;
  font-size: 11px; line-height: 16px; text-align: center;
  font-weight: 700;
}

/* F6 — bulk selection */
.lead-select {
  display: flex; align-items: center; padding: 0 6px 0 2px;
  cursor: pointer; flex-shrink: 0;
}
.lead-select input[type="checkbox"] {
  width: 14px; height: 14px; cursor: pointer; accent-color: var(--accent, #f0abfc);
}
.bulk-toolbar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2, #1a1a1a);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6);
  z-index: 50;
}
.bulk-toolbar .bulk-count {
  font-size: 12px; color: var(--text-dim, #a3a3a3);
  padding-right: 6px; border-right: 1px solid var(--border, #2a2a2a);
}
.bulk-toolbar .btn { font-size: 12px; padding: 6px 12px; }
.bulk-toolbar .btn-ghost { background: transparent; color: var(--text-dim, #a3a3a3); }
.bulk-toolbar .btn-ghost:hover { color: var(--text, #fafafa); }

.lead-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.lead-name {
  font-weight: 600; font-size: 13.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead-meta {
  font-size: 11.5px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead-email {
  font-size: 11px; color: var(--accent-2); font-family: 'SF Mono', 'Menlo', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.lead-email a { color: var(--accent-2); }
.lead-email a:hover { color: var(--accent); }
.lead-email.none { color: var(--text-faint); font-family: inherit; font-style: italic; }

/* stage chip on right of row */
.chip {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 99px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip.scraped       { background: var(--surface-2); color: var(--text-dim); border-color: var(--border); }
.chip.enriched      { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(103,232,249,0.2); }
.chip.judged        { background: var(--green-soft); color: var(--green); border-color: rgba(74,222,128,0.2); }
.chip.site_generated { background: var(--amber-soft); color: var(--amber); border-color: rgba(251,191,36,0.2); }
.chip.deployed      { background: var(--green-soft); color: var(--green); border-color: rgba(74,222,128,0.22); }
.chip.draft_created { background: var(--blue-soft); color: var(--blue); border-color: rgba(96,165,250,0.2); }
.chip.sent          { background: var(--purple-soft); color: var(--purple); border-color: rgba(192,132,252,0.22); }
.chip.trashed       { background: var(--red-soft); color: var(--red); border-color: rgba(248,113,113,0.2); }
.chip.dropped       { background: var(--red-soft); color: var(--red); border-color: rgba(248,113,113,0.2); }
.chip.processing {
  background: linear-gradient(90deg, rgba(240,195,74,0.07), rgba(240,195,74,0.28), rgba(240,195,74,0.07));
  background-size: 200% 100%;
  color: var(--accent-2);
  border-color: var(--accent-line);
  animation: pulse-bg 1.6s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip.processing::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-bg {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.lead-row.is-processing { background: linear-gradient(90deg, var(--bg) 0%, rgba(240,195,74,0.07) 100%); }

.list-empty {
  padding: 56px 28px;
  font-size: 13px; color: var(--text-faint);
  text-align: center;
}

/* ─── Detail pane ─────────────────────────────────────────────────────── */
.detail {
  overflow-y: auto;
  background: var(--bg);
}
.detail-inner { padding: 32px 44px; max-width: 1400px; margin: 0 auto; }
.detail-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  color: var(--text-faint);
  font-size: 14px;
}

.detail-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 28px;
}
.detail-head .avatar { width: 64px; height: 64px; border-radius: 10px; font-size: 22px; }
.detail-head h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
  margin-bottom: 4px;
  color: var(--text);
}
.detail-head .head-meta {
  font-size: 13px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.detail-head .head-meta .sep { color: var(--text-faint); }
.detail-head .head-meta .rating { color: var(--amber); font-weight: 600; }

/* ─── Pipeline timeline ───────────────────────────────────────────────── */
.timeline {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.tl-step {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  font-size: 12px;
  color: var(--text-faint);
}
.tl-step .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-faint);
  flex-shrink: 0;
}
.tl-step.done .dot { background: var(--green); border-color: var(--green); color: #0a0a0a; }
.tl-step.current .dot { background: var(--accent); border-color: var(--accent); color: #0a1428; box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-step.done, .tl-step.current { color: var(--text); font-weight: 500; }
.tl-line {
  flex: 1; height: 2px; background: var(--border);
}
.tl-line.done { background: var(--green); }

/* ─── Action bar ──────────────────────────────────────────────────────── */
.action-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.btn {
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #0a1428; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: #2e2e2e; }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--border); }
.btn-danger:hover { background: var(--red-soft); border-color: rgba(248,113,113,0.3); }

.btn svg { width: 14px; height: 14px; }

/* ─── Compare ─────────────────────────────────────────────────────────── */
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 28px;
}
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.compare-label .marker { display: inline-flex; align-items: center; gap: 6px; }
.compare-label .marker .dot { width: 8px; height: 8px; border-radius: 50%; }
.compare-label .theirs .dot { background: var(--text-faint); }
.compare-label .ours .dot { background: var(--accent); }
.compare-label .open {
  color: var(--text-dim); font-size: 11px; font-weight: 500;
}
.compare-label .open:hover { color: var(--accent); }
.compare-body {
  background: #050505;
  height: 580px;
  overflow: hidden; position: relative;
}
.compare-body img,
.compare-body iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.compare-body img { object-fit: cover; object-position: top; }
.compare-empty {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 13px;
  padding: 20px;
  text-align: center;
}
.compare-empty .icon {
  width: 36px; height: 36px;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}

/* ─── Cards row ───────────────────────────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
  margin-bottom: 20px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.info-card .label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.info-card .kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 0; font-size: 13px;
}
.info-card .kv .k { color: var(--text-dim); flex-shrink: 0; }
.info-card .kv .v { color: var(--text); font-weight: 500; text-align: right; word-break: break-word; }
.info-card ul { list-style: none; }
.info-card li {
  font-size: 12.5px; padding: 4px 0; color: var(--text);
}
.info-card li::before { content: "·"; color: var(--text-faint); margin-right: 6px; }

.swatch-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); display: inline-block; }

/* ─── Error banner ────────────────────────────────────────────────────── */
.error-banner {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ─── Enrichment review ───────────────────────────────────────────────── */
.enrich-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.enrich-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.enrich-head .label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint);
}
.enrich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.enrich-cell.wide { grid-column: 1 / -1; }
.enrich-sub {
  font-size: 11px; color: var(--text-dim);
  margin-bottom: 8px; font-weight: 500;
}
.enrich-warn { color: var(--red); font-weight: 500; }
.enrich-ok { color: var(--text-faint); }
.enrich-empty {
  color: var(--text-faint); font-size: 12px; font-style: italic;
  padding: 8px 0;
}
.enrich-logo {
  width: 80px; height: 80px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
}
.enrich-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.enrich-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.enrich-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px; color: var(--text);
}
.enrich-chip .sw {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid var(--border);
}
.enrich-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
}
.enrich-photo {
  display: block; aspect-ratio: 1;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.enrich-photo img { width: 100%; height: 100%; object-fit: cover; }
.enrich-photo.broken { background: var(--red-soft); }
.enrich-photo.broken img { display: none; }
.enrich-photo-more {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; background: var(--bg);
  border: 1px dashed var(--border); border-radius: 6px;
  color: var(--text-dim); font-size: 12px;
}
.enrich-text {
  font-size: 13px; color: var(--text); line-height: 1.5;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px;
}

/* ─── Reviews section ─────────────────────────────────────────────────── */
.reviews-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.reviews-block .label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.review {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.review:last-child { border: 0; }
.review-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; margin-bottom: 4px;
}
.review-head .author { font-weight: 600; color: var(--text); }
.review-head .rating { color: var(--amber); font-weight: 500; }
.review-head .date { color: var(--text-faint); font-size: 11px; }
.review-text {
  font-size: 13px; color: var(--text-dim); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Reasons (judge) ─────────────────────────────────────────────────── */
.reasons-block {
  background: var(--green-soft);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.reasons-block .label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--green);
  margin-bottom: 8px;
}
.reasons-block li { font-size: 13px; padding: 3px 0; list-style: none; color: var(--text); }
.reasons-block li::before { content: "✓"; color: var(--green); margin-right: 8px; font-weight: 700; }

/* ─── Modal (scrape) ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: 440px; max-width: 92vw;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; color: var(--text); }
.modal .help { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.modal .field { margin-bottom: 14px; }
.modal .field label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px; color: var(--text);
  font-family: inherit;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal .actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 22px;
}

/* ─── Toast / jobs ────────────────────────────────────────────────────── */
.jobs-bar {
  position: fixed;
  bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 80;
  max-width: 380px;
}
.job-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  min-width: 240px;
}
.job-toast.done { border-color: rgba(74,222,128,0.3); color: var(--green); }
.job-toast.failed { border-color: rgba(248,113,113,0.3); color: var(--red); }
.job-toast .spin {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.job-toast .close {
  background: transparent; color: var(--text-faint);
  font-size: 18px; line-height: 1; padding: 0 0 0 4px; margin-left: auto;
}
.job-toast .close:hover { color: var(--text); }

/* ─── Archetype picker (rendered inline by app.js) ────────────────────── */
.archetype-picker { color: var(--text-dim); }
.archetype-picker select#archetype-select {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  appearance: none;
}
.archetype-picker select#archetype-select:focus {
  outline: 0;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.archetype-picker select option { background: var(--surface); color: var(--text); }
