/* Duplicate Review — triage of find_duplicates.py's review queue. */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
}

/* ── toolbar ─────────────────────────────────────────────────────────── */

#toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.back-btn {
  text-decoration: none;
  color: #555;
  font-size: 18px;
  padding: 2px 8px;
  border-radius: 6px;
}
.back-btn:hover { background: #eee; }

.app-title { font-weight: 700; font-size: 16px; }

#hint-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.hint-chip {
  border: 1px solid #d0d0d0;
  background: #fafafa;
  border-radius: 14px;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
}
.hint-chip.active { background: #1a85ff; border-color: #1a85ff; color: #fff; }
.hint-chip .n { opacity: 0.65; margin-left: 4px; }

.chk { font-size: 13px; color: #444; display: flex; gap: 5px; align-items: center; }

.stats { margin-left: auto; font-size: 13px; color: #777; }

#banner {
  margin: 10px 16px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff4e0;
  border: 1px solid #f0d9a8;
  font-size: 13px;
}
#banner.hidden { display: none; }

/* ── pair cards ──────────────────────────────────────────────────────── */

#pair-list { padding: 14px 16px 60px; display: flex; flex-direction: column; gap: 14px; }

.pair {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.pair.decided { border-color: #9fd6a9; }
.pair.decided .pair-head { background: #f0faf1; }

.pair-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.badge {
  border-radius: 10px;
  padding: 2px 9px;
  font-weight: 600;
  font-size: 11.5px;
  background: #eee;
  color: #444;
  white-space: nowrap;
}
.badge.hint-near_dup                 { background: #e3f0ff; color: #0b5cc2; }
.badge.hint-exact_text               { background: #fde8ef; color: #b0114b; }
.badge.hint-same_country_cross_year  { background: #fff3d6; color: #8a6400; }
.badge.hint-imf_twin_scrape          { background: #e7f7ee; color: #077a46; }
.badge.hint-imf_joint_folder         { background: #efe7fb; color: #5a2ca0; }
.badge.hint-cross_institution        { background: #ffe9df; color: #b34a12; }

.pair-note { color: #888; flex: 1; min-width: 200px; }
.pair-verdict { font-weight: 600; color: #0a7a3d; }

.pair-body { display: grid; grid-template-columns: 1fr 1fr; }

.side {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.side + .side { border-left: 1px solid #eee; }
.side.kept { background: #f4fbf5; }
.side.dropped { opacity: 0.55; }

.side .rel {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #555;
  word-break: break-all;
}

.side .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.side .meta span { color: #666; }
.side .meta b { color: #222; font-weight: 600; }
.side .meta .warn { color: #b0114b; font-weight: 600; }

.cover-wrap { position: relative; }
.cover {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  object-position: top left;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fdfdfd;
  cursor: zoom-in;
  min-height: 60px;
}
.cover-missing {
  border: 1px dashed #ccc;
  border-radius: 6px;
  color: #999;
  font-size: 12px;
  padding: 18px;
  text-align: center;
}

.text-head {
  display: none;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  background: #fbfbfb;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 10px;
  max-height: 300px;
  overflow: auto;
}
.text-head.open { display: block; }

.side-actions { display: flex; gap: 8px; margin-top: auto; }

button {
  font: inherit;
  font-size: 12.5px;
  border: 1px solid #cfcfcf;
  background: #fff;
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
}
button:hover { background: #f0f0f0; }
button.primary { border-color: #1a85ff; color: #1a85ff; font-weight: 600; }
button.primary:hover { background: #eaf3ff; }
button.selected { background: #1a85ff; border-color: #1a85ff; color: #fff; }
button.subtle { color: #777; }
button.danger { color: #b0114b; border-color: #e5b3c4; }
button.danger.selected { background: #b0114b; border-color: #b0114b; color: #fff; }

.pair-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid #eee;
  background: #fcfcfc;
  flex-wrap: wrap;
}
.pair-foot input[type="text"] {
  flex: 1;
  min-width: 180px;
  font: inherit;
  font-size: 12.5px;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 5px 9px;
}

.group-info { font-size: 12px; color: #7a5ca8; }
