/* ─────────────────────────────────────────────────────────────
   Capraseo — Marketplace catalog

   Each site is a listing card (.mk-card): a header (domain + health
   verdict), a metrics strip (DR / traffic / country / link), and a
   grid of marketplace offer-cards. Reuses the chip filter bar
   (chat.css) and the search/foot styling (keywords.css).
   ───────────────────────────────────────────────────────────── */

/* ── Site cards ──────────────────────────────────────────────────── */
/* Standalone list — the media cards live outside the filter card, so no
   inner padding; each .mk-card carries its own card chrome. */
.mk-list { display: flex; flex-direction: column; gap: 12px; }
/* The footer (count + Show more) floats below the list, not inside a card. */
.mk-list + .kw-foot { border-top: 0; padding: 0 6px; }
.mk-card {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--wash-rgb), 0.022), rgba(var(--wash-rgb), 0.008));
  overflow: hidden;
  /* Whole card is clickable (opens the detail page). */
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.mk-card:hover {
  border-color: rgba(var(--wash-rgb), 0.14);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -16px rgba(0,0,0,0.8);
}
.mk-card-main { flex: 1; min-width: 0; padding: 14px 16px; }

/* ── Left "live vetting screen" panel ──────────────────────────── */
.mk-panel {
  flex-shrink: 0;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px;
  background: rgba(99, 102, 241,0.04);
  border-right: 1px solid var(--line);
}
.mk-panel-empty { background: rgba(var(--wash-rgb), 0.015); }
.mk-panel-verdict {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.mk-panel-stats { display: flex; flex-direction: column; gap: 7px; }
.mk-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mk-stat-label { font-size: 11px; color: var(--muted-2); }
.mk-stat-val { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.mk-stat-unit { font-size: 10px; color: var(--muted-2); font-weight: 400; margin-left: 1px; }
.mk-stat-na { color: var(--muted-2); }
.mk-s-low { color: var(--cyan-1); }
.mk-s-mid { color: var(--gold-2); }
.mk-s-high { color: var(--red-2); }
.mk-panel-foot { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); margin-top: auto; }
.mk-panel-foot-ph { color: rgba(99, 102, 241,0.55); }

.mk-card-head { display: flex; align-items: center; gap: 12px; }
.mk-site {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.mk-site:hover { color: var(--accent); }
.mk-site .mk-ext { opacity: 0; transition: opacity 140ms ease; }
.mk-site:hover .mk-ext { opacity: 0.7; }

/* Health badge — verdict word + score from the import */
.mk-health {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.mk-h-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  background: rgba(var(--well-rgb), var(--well-a25));
}
.mk-h-buy     { background: rgba(99, 102, 241,0.14);  color: var(--cyan-1); border-color: rgba(99, 102, 241,0.30); }
.mk-h-caution { background: rgba(234,179,8,0.12);  color: var(--gold-2); border-color: rgba(234,179,8,0.28); }
.mk-h-avoid   { background: rgba(239,68,68,0.12);  color: var(--red-2); border-color: rgba(239,68,68,0.28); }
.mk-h-none    { background: rgba(var(--wash-rgb), 0.04); color: var(--muted-2); border-color: var(--line); font-weight: 500; }
.mk-h-live { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; animation: mk-pulse 2s ease-in-out infinite; }
@keyframes mk-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Metrics strip */
.mk-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--muted);
}
.mk-meta .mk-sep { color: var(--muted-2); }
.mk-meta-badges { display: inline-flex; gap: 6px; margin-left: 2px; }
.mk-m { color: var(--muted); }

/* DR pill */
.mk-dr {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(var(--wash-rgb), 0.05);
  color: var(--muted);
}
.mk-dr-hi  { background: rgba(99, 102, 241,0.16);  color: var(--cyan-1); }
.mk-dr-mid { background: rgba(234,179,8,0.14);   color: var(--gold-2); }
.mk-dr-lo  { background: rgba(var(--wash-rgb), 0.05); color: var(--muted); }

/* Link / placement badges */
.mk-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.mk-do   { background: rgba(99, 102, 241,0.14);  color: var(--cyan-1); }
.mk-no   { background: rgba(var(--wash-rgb), 0.05); color: var(--muted); }
.mk-type {
  background: rgba(var(--wash-rgb), 0.04);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Marketplace offer cards */
.mk-offer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mk-offer-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 116px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(var(--wash-rgb), 0.022);
  transition: border-color 140ms ease, background 140ms ease;
}
.mk-offer-card:hover { border-color: rgba(var(--wash-rgb), 0.16); background: rgba(var(--wash-rgb), 0.05); }
.mk-offer-name {
  font-size: 11.5px;
  color: var(--muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  display: block;
}
a.mk-offer-name:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mk-offer-price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mk-offer-card.mk-niche { border-color: rgba(99, 102, 241,0.30); background: rgba(99, 102, 241,0.06); }
.mk-offer-card.mk-niche .mk-offer-price { color: var(--cyan-1); }
.mk-offer-more {
  justify-content: center;
  align-items: center;
  color: var(--muted-2);
  font-size: 12px;
  min-width: 70px;
}

.mk-niche-tag {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(99, 102, 241,0.18);
  color: var(--cyan-1);
}

.mk-dim { color: var(--muted-2); font-size: 12.5px; }

/* ── Sort segmented control (replaces the table's sortable headers) ── */
.mk-sort { display: inline-flex; align-items: center; gap: 4px; }
.mk-sort-label { color: var(--muted-2); font-size: 12px; margin-right: 4px; }
.mk-sort-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--wash-rgb), 0.03);
  color: var(--muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 140ms ease;
}
.mk-sort-btn:hover { color: var(--text); border-color: rgba(var(--wash-rgb), 0.16); }
.mk-sort-btn.is-active {
  color: var(--mint-1);
  border-color: rgba(99, 102, 241,0.5);
  background: linear-gradient(180deg, rgba(99, 102, 241,0.16), rgba(99, 102, 241,0.06));
}
.mk-sort-dir { font-variant-numeric: tabular-nums; margin-left: 4px; font-size: 10px; }

/* Instant filter tooltip — one fixed element on <body> (see attachTip in
   marketplace.js). No native title delay, no fade-in: it appears the
   moment the pointer lands on a control. */
.mk-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  max-width: 270px;
  padding: 9px 12px;
  background: linear-gradient(180deg, rgba(var(--glass-hi-rgb),0.98), rgba(var(--glass-lo-rgb),0.98));
  border: 1px solid rgba(var(--wash-rgb), 0.1);
  border-radius: 9px;
  box-shadow:
    0 12px 28px -10px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(var(--wash-rgb), 0.04);
  color: var(--text-9);
  font-size: 11.5px;
  line-height: 1.5;
  pointer-events: none;
  visibility: hidden;
}
.mk-tip.visible { visibility: visible; }

/* "How we rank" — ghost button + plain-language legend panel */
.mk-howrank {
  height: 30px;
  padding: 0 11px;
  margin-left: auto;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}
.mk-howrank:hover, .mk-howrank.is-open { color: var(--text); border-color: rgba(var(--wash-rgb), 0.2); }
.mk-howrank-panel {
  margin: 0 20px 4px;
  padding: 14px 20px;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.mk-howrank-panel p { margin: 0 0 10px; }
.mk-howrank-panel p:last-child { margin-bottom: 0; }
.mk-howrank-panel strong { color: var(--text); font-weight: 600; }

/* ── Filter bar: chip dropdowns (reuses .chip/.menu/.menu-item from
   chat.css for the front-page look) ──────────────────────────────── */
.mk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  /* Last row of the filter card — no separator against the card edge. */
}
.mk-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mk-toolbar .kw-reset { margin-left: auto; }

/* A slightly taller, more substantial chip than the composer's, sized
   for a filter bar; selected state gets the accent treatment. */
.mk-filters .chip {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  background: rgba(var(--wash-rgb), 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  backdrop-filter: none;
}
.mk-filters .chip:hover,
.mk-filters .chip.open {
  background: rgba(var(--wash-rgb), 0.06);
  border-color: rgba(var(--wash-rgb), 0.14);
  color: var(--text);
}
.mk-filters .chip.is-set {
  border-color: rgba(99, 102, 241,0.55);
  background: linear-gradient(180deg, rgba(99, 102, 241,0.18), rgba(99, 102, 241,0.07));
  color: var(--mint-1);
}
.mk-filters .chip.is-set .chip-label { color: var(--mint-1); font-weight: 500; }
.mk-filters .chip.is-set::before {
  content: "";
  width: 6px; height: 6px; margin-right: 1px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(99, 102, 241,0.7);
  flex-shrink: 0;
}
.mk-filters .chip .chip-label { max-width: 220px; }

/* Menu: scrollable + a sticky type-to-filter box for the long lists */
.mk-menu { min-width: 200px; max-height: 320px; display: flex; flex-direction: column; }
.mk-menu-list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--wash-rgb), 0.18) transparent;
}
.mk-menu-list::-webkit-scrollbar { width: 4px; }
.mk-menu-list::-webkit-scrollbar-thumb { background: rgba(var(--wash-rgb), 0.18); border-radius: 4px; }
.mk-menu-search { padding: 2px 2px 6px; }
.mk-menu-search input {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(var(--wash-rgb), 0.08);
  background: rgba(var(--well-rgb), var(--well-a25));
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}
.mk-menu-search input:focus { border-color: rgba(99, 102, 241,0.4); }
.mk-menu .menu-item { padding: 8px 10px; font-size: 12.5px; }
.mk-menu .mi-count { color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.mk-menu .mi-label { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════
   Score-first redesign — Link Value Score, relevance, plain-language
   flags, smart presets, target context bar, DR range slider.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Target context bar ──────────────────────────────────────────── */
.mk-target {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 16px; padding: 11px 20px;
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(99, 102, 241,0.05), rgba(99, 102, 241,0.015));
}
.mk-target-partial { background: linear-gradient(180deg, rgba(234,179,8,0.06), rgba(234,179,8,0.015)); }
.mk-target-none { background: rgba(var(--wash-rgb), 0.012); color: var(--muted-2); }
.mk-target strong { color: var(--text); font-weight: 600; }
.mk-target a { color: var(--accent); text-decoration: none; }
.mk-target a:hover { text-decoration: underline; }
.mk-target-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(99, 102, 241,0.7); flex-shrink: 0; }
.mk-target-partial .mk-target-dot { background: var(--gold-2); box-shadow: 0 0 6px rgba(234,179,8,0.7); }
.mk-target-none .mk-target-dot { background: var(--muted-2); box-shadow: none; }
.mk-target-niche { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: rgba(99, 102, 241,0.12); color: var(--cyan-1); }
.mk-target-meta { color: var(--muted-2); font-size: 12px; }

/* ── Sort bar + "old way" nudge ──────────────────────────────────── */
.mk-sortbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 20px 4px; }
.mk-sort-nudge { font-size: 11.5px; color: var(--gold-2); }

/* ── Smart preset toggles ────────────────────────────────────────── */
.mk-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 20px 4px; }
.mk-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--wash-rgb), 0.03); color: var(--muted);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: all 140ms ease;
}
.mk-toggle:hover { color: var(--text); border-color: rgba(var(--wash-rgb), 0.16); }
.mk-toggle-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--muted-2); background: transparent;
  transition: all 140ms ease; flex-shrink: 0; position: relative;
}
.mk-toggle.is-on { color: var(--mint-1); border-color: rgba(99, 102, 241,0.5); background: linear-gradient(180deg, rgba(99, 102, 241,0.16), rgba(99, 102, 241,0.06)); }
.mk-toggle.is-on .mk-toggle-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 6px rgba(99, 102, 241,0.6); }
.mk-toggle.is-on .mk-toggle-dot::after {
  content: ""; position: absolute; left: 3px; top: 4.5px; width: 5px; height: 2.5px;
  border-left: 1.5px solid #0b1f14; border-bottom: 1.5px solid #0b1f14; transform: rotate(-45deg);
}

/* ── Min–max range slider chips (DR + Price) ─────────────────────── */
.mk-range-chip {
  display: inline-flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: rgba(var(--wash-rgb), 0.03);
}
.mk-range-chip.is-set { border-color: rgba(99, 102, 241,0.55); background: linear-gradient(180deg, rgba(99, 102, 241,0.12), rgba(99, 102, 241,0.05)); }
.mk-range-name { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mk-range-out { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; min-width: 44px; }
.mk-range-chip.is-set .mk-range-out { color: var(--mint-1); }
.mk-range-slider { position: relative; width: 116px; height: 18px; display: flex; align-items: center; }
.mk-range-track { position: absolute; left: 0; right: 0; height: 4px; border-radius: 999px; background: rgba(var(--wash-rgb), 0.10); }
.mk-range-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.mk-range-input {
  position: absolute; left: 0; width: 100%; margin: 0; height: 18px;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.mk-range-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 14px; height: 14px; border-radius: 50%; cursor: pointer;
  background: var(--mint-1); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.mk-range-input::-moz-range-thumb {
  pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; cursor: pointer;
  background: var(--mint-1); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── Score-first card ────────────────────────────────────────────── */
.mk-card { position: relative; }
.mk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.mk-card.mk-tier-good::before { background: rgba(99, 102, 241,0.7); }
.mk-card.mk-tier-ok::before   { background: rgba(234,179,8,0.6); }
.mk-card.mk-tier-bad::before  { background: rgba(239,68,68,0.55); }

.mk-score {
  flex-shrink: 0; width: 86px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: rgba(var(--wash-rgb), 0.012);
}
.mk-score-num { font-size: 27px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); }
.mk-score-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); }
.mk-tier-good .mk-score-num { color: var(--cyan-1); }
.mk-tier-ok   .mk-score-num { color: var(--gold-2); }
.mk-tier-bad  .mk-score-num { color: var(--red-2); }
.mk-tier-good .mk-score { background: rgba(99, 102, 241,0.05); }

/* Pills (relevance + value-for-money) on the card head */
.mk-pill {
  display: inline-flex; align-items: center; height: 21px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.mk-rel-high { background: rgba(99, 102, 241,0.15); color: var(--cyan-1); border-color: rgba(99, 102, 241,0.3); }
.mk-rel-some { background: rgba(234,179,8,0.12); color: var(--gold-2); border-color: rgba(234,179,8,0.28); }
.mk-rel-off  { background: rgba(239,68,68,0.10); color: var(--red-2); border-color: rgba(239,68,68,0.24); }
.mk-val-exc  { background: rgba(99, 102, 241,0.10); color: var(--cyan-1); }
.mk-val-fair { background: rgba(var(--wash-rgb), 0.05); color: var(--muted); }
.mk-val-poor { background: rgba(var(--wash-rgb), 0.03); color: var(--muted-2); }
/* Competitor-overlap pill — a competitor of the in-focus domain links here.
   Violet so it reads as a distinct "intel" signal, not a quality verdict. */
.mk-comp {
  gap: 4px; cursor: help;
  background: rgba(139,92,246,0.13); color: var(--lt41);
  border-color: rgba(139,92,246,0.32);
}
.mk-comp svg { opacity: 0.9; }
/* Top pick — GOOD verdict + 70+ Link Value. Subtle: pill + stronger stripe. */
.mk-pick {
  background: rgba(99,102,241,0.18); color: #a5b4fc;
  border-color: rgba(99,102,241,0.45); cursor: help;
}
.mk-card.mk-top-pick { border-color: rgba(99,102,241,0.35); }
.mk-card.mk-top-pick::before { background: var(--accent); }
.mk-card-head { flex-wrap: wrap; }

/* Floating "Save" badge — pushed to the right edge of the card head. */
.mk-save-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: auto; height: 24px; padding: 0 11px;
  border-radius: 999px; font: 600 11.5px 'Inter', sans-serif; white-space: nowrap;
  color: var(--cyan-1); background: rgba(99, 102, 241,0.10);
  border: 1px solid rgba(99, 102, 241,0.30);
  cursor: pointer; transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.mk-save-badge svg { flex-shrink: 0; }
.mk-save-badge:hover { background: rgba(99, 102, 241,0.18); border-color: rgba(99, 102, 241,0.45); }
.mk-save-badge:active { transform: translateY(0.5px); }
.mk-save-badge[data-saved="1"] {
  color: var(--mint-bg2); background: rgba(99, 102, 241,0.82); border-color: rgba(99, 102, 241,0.82);
}
.mk-save-badge[data-saved="1"]:hover { background: rgba(99, 102, 241,0.92); border-color: rgba(99, 102, 241,0.92); }

/* "Hide" badge — muted sibling of Save (Save owns margin-left:auto). */
.mk-hide-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 6px; height: 24px; padding: 0 11px;
  border-radius: 999px; font: 600 11.5px 'Inter', sans-serif; white-space: nowrap;
  color: var(--muted); background: rgba(var(--wash-rgb), 0.04);
  border: 1px solid rgba(var(--wash-rgb), 0.14);
  cursor: pointer; transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.mk-hide-badge svg { flex-shrink: 0; }
.mk-hide-badge:hover { color: var(--text); background: rgba(var(--wash-rgb), 0.08); border-color: rgba(var(--wash-rgb), 0.24); }
.mk-hide-badge:active { transform: translateY(0.5px); }

/* ── Saved links page (/marketplace/saved/) ─────────────────────── */
.saved-summary {
  margin: 2px 2px 14px; font-size: 13px; color: var(--muted);
}
.saved-summary-acq { color: var(--cyan-1); font-weight: 600; }
/* Rows are plain .mk-card clones of the marketplace list; only the
   acquired pill and remove button are saved-page-specific. */
.saved-acq {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.saved-acq-yes { color: var(--mint-bg2); background: rgba(99, 102, 241,0.82); }
.saved-acq-no { color: rgba(var(--grey-rgb),0.55); background: rgba(var(--wash-rgb), 0.05); }
.saved-remove {
  margin-left: auto; flex-shrink: 0;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 7px;
  color: rgba(var(--grey-rgb),0.4); cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.saved-remove:hover { background: rgba(255,80,80,0.12); color: #ff8a8a; }
.saved-empty { text-align: center; padding: 40px 24px; }
.saved-empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.saved-empty-copy { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 460px; margin: 0 auto; }
.saved-empty-copy a { color: var(--cyan-1); }

/* The saved/hidden hint toast (.capraseo-saved-hint) lives in main.css —
   the store also runs on the front page (chat), which doesn't load this
   file. */

/* Hidden-domains manage list (bottom of /marketplace/saved/) */
.saved-hidden { margin-top: 22px; padding: 18px 20px; }
.saved-hidden-title { font-size: 14px; font-weight: 600; color: var(--text); }
.saved-hidden-copy { margin: 6px 0 12px; font-size: 12.5px; color: var(--muted); }
.hidden-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-top: 1px solid rgba(var(--wash-rgb), 0.06);
}
.hidden-site { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.hidden-site:hover { color: var(--text); text-decoration: underline; }
.hidden-restore {
  flex-shrink: 0; height: 26px; padding: 0 12px; border-radius: 999px;
  font: 600 11.5px 'Inter', sans-serif; color: var(--muted); cursor: pointer;
  background: rgba(var(--wash-rgb), 0.04); border: 1px solid rgba(var(--wash-rgb), 0.14);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.hidden-restore:hover { color: var(--text); background: rgba(var(--wash-rgb), 0.08); border-color: rgba(var(--wash-rgb), 0.24); }

/* Context line (demoted DR / traffic / country / spam) */
.mk-ctx { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.mk-ctx .mk-sep { color: var(--muted-2); }
.mk-ctx-dr { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.mk-ctx-est { color: var(--muted-2); font-size: 11px; }

/* Plain-language flags */
.mk-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mk-flag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 500; border: 1px solid transparent;
}
.mk-flag-good    { background: rgba(99, 102, 241,0.10); color: var(--cyan-1); border-color: rgba(99, 102, 241,0.22); }
.mk-flag-bad     { background: rgba(239,68,68,0.10); color: var(--red-2); border-color: rgba(239,68,68,0.24); }
.mk-flag-warn    { background: rgba(234,179,8,0.10); color: var(--gold-2); border-color: rgba(234,179,8,0.24); }
.mk-flag-neutral { background: rgba(var(--wash-rgb), 0.04); color: var(--muted); border-color: var(--line); }

/* Cheapest offer highlight */
.mk-offer-card.mk-offer-cheap { border-color: rgba(99, 102, 241,0.35); }
.mk-offer-card.mk-offer-cheap .mk-offer-price { color: var(--cyan-1); }

/* Empty state */
.mk-empty { padding: 40px 20px; text-align: center; color: var(--muted-2); font-size: 13.5px; }

/* ── Mobile filters ──────────────────────────────────────────────────
   On a phone the sort buttons clipped off the right edge and the DR/Price
   range chips crammed side-by-side at a fixed 116px slider width. Let the
   sort buttons wrap, and stack the filter toolbar so each slider spans the
   full width with the filter chips wrapping cleanly beneath. */
@media (max-width: 768px) {
  .mk-sort { flex-wrap: wrap; }
  .mk-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .mk-range-chip { width: 100%; height: 38px; }
  .mk-range-slider { flex: 1; width: auto; }
  .mk-filters { width: 100%; }
  .mk-toolbar .kw-reset { margin-left: 0; align-self: flex-start; }

  /* ── List card: stack the vetting panel ───────────────────────────
     On desktop each card is [150px verdict/stats panel | main]. On a
     phone that fixed panel ate ~half the card width. Stack the card so
     the panel becomes a compact full-width strip on top: the verdict
     pill sits inline with the vetting stats laid out left-to-right
     (label over value) instead of a tall left column. */
  .mk-card { flex-direction: column; }
  .mk-score {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .mk-panel {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 11px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .mk-panel-verdict { align-self: center; }
  .mk-panel-stats {
    flex: 1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
  }
  .mk-stat {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1px;
  }
  /* The "live data" footer is redundant next to the live dot on mobile. */
  .mk-panel-foot { display: none; }
}

/* ── Link-finding agent card ──────────────────────────────────────
   The compact standalone card between the filters and the inventory
   (#mk-agent-card). Accent-tinted so it reads as "yours", not another
   listing. Three states driven by marketplace-agent.js: CTA row →
   slide-down options panel → live status row. */
.mk-agent-card {
  padding: 12px 16px;
  border-color: rgba(99, 102, 241, 0.22);
  background:
    linear-gradient(180deg, rgba(99,102,241,0.06), rgba(99,102,241,0.015)),
    var(--panel);
}
.mk-agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mk-agent-row[hidden] { display: none; }
.mk-agent-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  min-width: 0;
}
.mk-agent-copy strong { color: var(--text); font-weight: 600; margin-right: 6px; }
.mk-agent-btn {
  flex-shrink: 0;
  height: 32px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-strong));
  color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
}
.mk-agent-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.mk-agent-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.mk-agent-cancel {
  height: 32px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--wash-rgb), 0.03); color: var(--muted);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: all 140ms ease;
}
.mk-agent-cancel:hover { color: var(--text); border-color: rgba(var(--wash-rgb), 0.16); }
.mk-agent-delete:hover { color: #f0a5a5; border-color: rgba(240,120,120,0.35); }
.mk-agent-controls { display: inline-flex; gap: 8px; flex-shrink: 0; }

/* The slide-down options panel. */
.mk-agent-panel { padding-top: 2px; }
.mk-agent-panel[hidden] { display: none; }
.mk-agent-fields { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.mk-agent-field { display: flex; flex-direction: column; gap: 5px; min-width: 170px; }
.mk-agent-label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.mk-agent-input {
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(var(--wash-rgb), 0.04); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.mk-agent-input:focus { outline: none; border-color: var(--accent-dim); }
select.mk-agent-input option { background: #171923; color: var(--text); }
.mk-agent-summary {
  margin: 0 0 6px;
  font-size: 12.5px; line-height: 1.5; color: var(--text);
}
.mk-agent-note {
  margin: 0 0 12px;
  font-size: 12px; line-height: 1.5; color: var(--muted);
  max-width: 720px;
}
.mk-agent-actions { display: flex; align-items: center; gap: 10px; }
.mk-agent-err { font-size: 12.5px; color: #f0a5a5; }
.mk-agent-err[hidden] { display: none; }

/* Health pill — same palette as the /agents/ page cards (.ac-health). */
.mk-agent-health {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 9px; margin-right: 8px;
  border-radius: 999px; white-space: nowrap;
  vertical-align: 1px;
}
.mk-agent-health.is-good      { color: #7fe3aa; background: rgba(52,211,153,0.14); }
.mk-agent-health.is-attention { color: #ffcf8f; background: rgba(245,177,74,0.16); }
.mk-agent-health.is-paused    { color: var(--lt42); background: rgba(148,163,184,0.14); }
.mk-agent-health.is-done      { color: var(--ind-2); background: rgba(129,140,248,0.16); }
.mk-agent-health.is-starting  { color: #a8c5ff; background: rgba(91,141,239,0.14); }

@media (max-width: 640px) {
  .mk-agent-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Agent-picked rows on /marketplace/saved/: the chip next to the domain
   and the one-line "why this fits" from the link-finding agent. */
.saved-agent-chip {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 999px;
  color: var(--ind-2); background: rgba(129,140,248,0.16);
  border: 1px solid rgba(129,140,248,0.25);
  white-space: nowrap;
}
.saved-agent-reason {
  margin: 2px 0 8px;
  font-size: 12.5px; line-height: 1.5;
  color: var(--muted);
}
