:root {
  --navy: #0f2f66;
  --navy-mid: #174bae;
  --blue: #1f5ed3;
  --blue-soft: #eaf1fd;
  --orange: #f7761e;
  --orange-dark: #dc6412;
  --ink: #17233a;
  --muted: #5d6b83;
  --line: #dde4ef;
  --page: #f4f7fb;
  --white: #fff;
  --amber: #b26a00;
  --amber-bg: #fff7e8;
  --amber-line: #f0c37a;
  --red: #b3261e;
  --red-bg: #fdeceb;
  --red-line: #f0b3ae;
  --green: #16794a;
  --green-bg: #eaf6f0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 47, 102, .06), 0 6px 18px rgba(15, 47, 102, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }

/* ── header ───────────────────────────────────────────────────────────────── */
.masthead {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
}
.masthead-inner {
  max-width: 1060px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo {
  font-size: 26px; font-weight: 700; letter-spacing: 3px;
}
.logo span { color: var(--orange); }
.masthead .tagline { color: #c8d8f5; font-size: 14px; margin-right: auto; }
.whoami { font-size: 14px; color: #dce7fa; display: flex; align-items: center; gap: 12px; }

/* ── layout ───────────────────────────────────────────────────────────────── */
main { max-width: 1060px; margin: 0 auto; padding: 28px 24px 80px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card > h2 {
  font-size: 19px; color: var(--navy);
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.card > .hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.step-badge {
  background: var(--blue-soft); color: var(--blue);
  font-size: 12px; font-weight: 700; letter-spacing: .8px;
  padding: 4px 9px; border-radius: 20px; text-transform: uppercase;
}
.step-badge.check { background: #fdeee1; color: var(--orange-dark); }

/* ── form controls ────────────────────────────────────────────────────────── */
label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 7px; }

input[type="text"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 94, 211, .14);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600;
  padding: 13px 22px; border-radius: 8px;
  transition: background .12s ease, opacity .12s ease;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn-primary.big { width: 100%; padding: 16px; font-size: 17px; letter-spacing: .4px; }
.btn-secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-secondary:hover:not(:disabled) { background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--page); }
.btn-small { padding: 8px 14px; font-size: 14px; }
.btn-link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.ebay-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding-bottom: 18px; }
.ebay-preview > *:not(.ebay-draft-banner) { margin-left: 22px; margin-right: 22px; }
.ebay-draft-banner { background: var(--navy); color: #fff; padding: 14px 22px; font-weight: 700; }
.ebay-preview h1 { color: var(--navy); font-size: 25px; margin-top: 22px; }
.ebay-preview h3 { color: var(--navy); margin-top: 22px; }
.ebay-price { color: var(--orange-dark); font-size: 25px; font-weight: 700; }
.ebay-copy { color: var(--muted); }
.ebay-form-grid { display:grid; grid-template-columns: 1.4fr 1fr; gap:18px; }
.ebay-html { min-height: 300px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ebay-specifics, .ebay-policies { margin-top: 24px; padding-top: 4px; border-top: 1px solid var(--line); }
.ebay-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px 16px; }
.ebay-fields label, .ebay-policy-grid label { display: grid; gap: 6px; font-weight: 700; color: var(--navy); }
.ebay-fields input, .ebay-fields select, .ebay-policy-grid select { width: 100%; }
.ebay-policy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.required, .preferred { margin-left: 5px; font-size: 12px; font-weight: 700; }
.required { color: var(--red); }
.preferred { color: var(--orange-dark); }
.ebay-preview pre { white-space: pre-wrap; }
.ebay-preview .ebay-facts { margin-bottom: 18px; }
.ebay-facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ebay-facts div { display: grid; grid-template-columns: 170px 1fr; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.ebay-facts div:last-child { border-bottom: 0; }
.ebay-facts dt { font-weight: 700; color: var(--navy); }
.ebay-facts dd { margin: 0; color: var(--muted); }

/* ── status / messages ────────────────────────────────────────────────────── */
.status { margin-top: 18px; }
.status-line {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; font-size: 14.5px; color: var(--muted);
  border-bottom: 1px solid #f0f3f8;
}
.status-line:last-child { border-bottom: 0; }
.status-line .dot {
  width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px;
  border-radius: 50%; border: 2px solid var(--line);
}
.status-line.running .dot { border-color: var(--blue); border-top-color: transparent; animation: spin .8s linear infinite; }
.status-line.done .dot { border-color: var(--green); background: var(--green); }
.status-line.done { color: var(--ink); }
.status-line.failed .dot { border-color: var(--red); background: var(--red); }
.status-line.failed { color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  border-radius: 8px; padding: 14px 16px; font-size: 14.5px;
  border: 1px solid; margin-bottom: 16px;
}
.alert-error { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.alert-warn { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.alert-ok { background: var(--green-bg); border-color: #b9dfcc; color: var(--green); }
.alert strong { display: block; margin-bottom: 3px; }
.alert pre { white-space: pre-wrap; margin: 6px 0 0; font: inherit; }

/* ── flags ────────────────────────────────────────────────────────────────── */
.flag {
  border-left: 4px solid var(--amber-line); background: var(--amber-bg);
  border-radius: 0 8px 8px 0; padding: 12px 14px; margin: 10px 0; font-size: 14.5px;
}
.flag.error { border-left-color: var(--red-line); background: var(--red-bg); }
.flag.info { border-left-color: #b9cdf0; background: var(--blue-soft); }
.flag-head {
  font-weight: 700; font-size: 12px; letter-spacing: .7px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 5px;
}
.flag.error .flag-head { color: var(--red); }
.flag.info .flag-head { color: var(--blue); }
.flag-compare {
  display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px;
  margin-top: 9px; font-size: 13.5px; background: rgba(255,255,255,.65);
  padding: 9px 11px; border-radius: 6px;
}
.flag-compare dt { font-weight: 600; color: var(--muted); }
.flag-compare dd { margin: 0; }
.flag-src { color: var(--muted); font-size: 13px; margin-top: 7px; }
.flag-action-label { display:block; margin:12px 0 5px; font-size:13px; }
.flag-action { max-width:320px; padding:8px 10px !important; font-size:14px !important; }
.flag-resolution { display:block; margin-top:6px; color:var(--muted); font-size:13px; }
.flag-reviewed { opacity:.68; }

/* ── preview card ─────────────────────────────────────────────────────────── */
.preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-head { background: var(--navy); color: #fff; padding: 20px 24px; }
.preview-head h3 { font-size: 21px; }
.preview-price { font-size: 27px; font-weight: 700; color: var(--orange); margin-top: 6px; }
.preview-body { padding: 24px; background: #fff; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 20px; }
.preview-meta > div { min-width: 180px; }
.preview-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.preview-meta dd { margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  background: var(--blue-soft); color: var(--navy-mid);
  border-radius: 20px; padding: 3px 11px; font-size: 13px;
}
.chip .gid { color: var(--muted); font-size: 11.5px; }

/* ── the editable description box ─────────────────────────────────────────── */
.editor-bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 7px;
}
.editor-bar .btn-link { font-size: 13.5px; flex: 0 0 auto; }

/* two classes so this wins over the plain .desc-render rules below */
.desc-render.editable {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 24px; background: #fff;
  max-height: 560px; overflow-y: auto;
  font-size: 16px; line-height: 1.6;
}
.editable:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 94, 211, .14);
}
.editable p:last-child, .editable ul:last-child { margin-bottom: 0; }

.desc-render { border-top: 1px solid var(--line); padding-top: 20px; }
.desc-render p { margin: 0 0 14px; }
.desc-render h3 { color: var(--navy); font-size: 17px; margin: 22px 0 10px; }
.desc-render ul { margin: 0 0 16px; padding-left: 22px; }
.desc-render li { margin-bottom: 4px; }

/* ── image picker ─────────────────────────────────────────────────────────── */
.image-picker { display: flex; flex-wrap: wrap; gap: 12px; }
.image-pick {
  width: 150px; border: 2px solid var(--line); border-radius: 8px;
  padding: 8px; cursor: pointer; background: #fff; position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.image-pick:hover { border-color: var(--blue); }
.image-pick.on { border-color: var(--blue); background: var(--blue-soft); }
.image-pick img {
  width: 100%; height: 110px; object-fit: contain; background: #fff; border-radius: 4px;
}
.image-pick .cap { font-size: 11.5px; color: var(--muted); word-break: break-all; line-height: 1.35; }
.image-pick .num {
  position: absolute; top: 4px; left: 4px;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  width: 22px; height: 22px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.image-pick.on .num { display: flex; }
.image-pick input { display: none; }

.pv-image-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pv-image-strip img {
  width: 92px; height: 92px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px;
}

/* ── search tag picker ────────────────────────────────────────────────────── */
.tag-picker {
  margin-top: 10px; max-height: 340px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 16px 14px; background: #fff;
}
.tag-group { margin-top: 12px; }
.tag-group:first-child { margin-top: 4px; }
.tag-group > h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 7px;
  padding: 6px 0 4px; border-bottom: 1px solid var(--line);
}
.tag-options { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tag-option {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; cursor: pointer; padding: 3px 0; min-width: 150px;
}
.tag-option input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.tag-option:hover { color: var(--blue); }
.tag-picker .empty { padding: 14px 0; }

/* ── approved list ────────────────────────────────────────────────────────── */
.approved-item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.approved-item:last-child { border-bottom: 0; }
.approved-item .name { flex: 1 1 300px; font-weight: 600; }
.approved-item .sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.approved-item .price { font-weight: 700; color: var(--navy); }
.approved-item [data-images-error] { flex-basis: 100%; }
.bulk-queue { margin-top: 18px; }
.bulk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 0; border-top: 1px solid var(--line); }
.bulk-row .bulk-url { flex: 1 1 420px; overflow-wrap: anywhere; font-size: 14px; }
.bulk-row .bulk-state { font-size: 13px; font-weight: 700; color: var(--muted); }
.bulk-row.done .bulk-state { color: var(--green); }
.bulk-row.failed .bulk-state { color: var(--red, #b33a2b); }
.rapid-card { border: 2px solid #d9e4fb; }
.rapid-lines { display:flex; flex-direction:column; gap:10px; margin-bottom:10px; }
.rapid-line { display:grid; grid-template-columns:minmax(0, 1fr) 150px auto; gap:10px; align-items:center; }
.rapid-line .rapid-url, .rapid-line .rapid-price { width:100%; box-sizing:border-box; }
.rapid-line .rapid-remove { white-space:nowrap; }
.rapid-options { display:flex; gap:24px; align-items:flex-end; flex-wrap:wrap; margin-top:14px; }
.rapid-options label { display:flex; flex-direction:column; gap:7px; font-weight:700; color:var(--navy); }
.rapid-options input[type=text] { width:180px; }
.rapid-options .checkline { flex-direction:row; align-items:center; font-weight:500; padding-bottom:10px; }
.rapid-options .checkline input { width:18px; height:18px; accent-color:var(--blue); }
.rapid-message { flex: 1 1 100%; color: var(--red, #b33a2b); }
.rapid-photos { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.rapid-photos h3 { margin: 0 0 6px; color: var(--navy); }
.rapid-photo-source-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.rapid-photo-source-row input { flex: 1 1 240px; min-width: 0; }
.rapid-photo-tile { display: flex; flex-direction: column; width: 132px; gap: 6px; }
.rapid-photo-tile .image-pick { width: 100%; min-height: 126px; font: inherit; color: inherit; }
.rapid-photo-tile .cap { overflow-wrap: anywhere; word-break: normal; }
.rapid-photo-tile a { font-size: 12px; overflow-wrap: anywhere; }
.rapid-edit { margin-top: 18px; padding: 18px; border: 1px solid var(--amber-line); border-radius: 10px; background: var(--amber-bg); }
.rapid-edit h3 { margin: 0 0 6px; color: var(--navy); }
.rapid-edit-fields { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; margin: 12px 0; }
.rapid-edit-fields label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--navy); }
.rapid-edit-fields input { width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { .rapid-edit-fields { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .rapid-line { grid-template-columns:1fr 120px; }
  .rapid-line .rapid-remove { grid-column:2; justify-self:end; }
}
.pill {
  font-size: 12px; padding: 2px 9px; border-radius: 20px;
  background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line);
}
.pill.clean { background: var(--green-bg); color: var(--green); border-color: #b9dfcc; }

.empty { color: var(--muted); font-size: 14.5px; padding: 8px 0; }

/* ── login ────────────────────────────────────────────────────────────────── */
.login-wrap { max-width: 400px; margin: 90px auto; }
.login-wrap .logo { color: var(--navy); text-align: center; margin-bottom: 6px; }
.login-wrap .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.login-wrap .field { margin-bottom: 16px; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

details.raw { margin-top: 18px; }
details.raw summary { cursor: pointer; color: var(--blue); font-size: 14px; }
details.raw pre {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; overflow-x: auto; font-size: 12.5px; margin-top: 10px;
}

@media (max-width: 620px) {
  .card { padding: 20px; }
  main { padding: 20px 14px 60px; }
}

/* ── view tabs ─────────────────────────────────────────────────────────── */
.tabs { background: #143b86; border-bottom: 1px solid #0f2f66; }
.tabs-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: thin;
}
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  color: #b9cdf0; font: inherit; font-weight: 600; font-size: 14px;
  letter-spacing: .02em; padding: 13px 18px; border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: #fff; }
.tab.is-active { color: #fff; border-bottom-color: #f7761e; }

/* ── extra source URLs ─────────────────────────────────────────────────── */
.url-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.url-row input { flex: 1; margin: 0; }

/* ── inline checkbox with an explanation ───────────────────────────────── */
.checkline { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.checkline input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; cursor: pointer; }
.checkline .hint { display: block; margin: 3px 0 0; font-weight: 400; }

/* ── spend panel ───────────────────────────────────────────────────────── */
.spend-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.spend-card {
  border: 1px solid #dde5f2; border-radius: 10px; padding: 16px 18px; background: #fbfcfe;
}
.spend-card .label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #5b7099;
}
.spend-card .value { font-size: 30px; font-weight: 700; color: #0f2f66; margin-top: 6px; line-height: 1.1; }
.spend-card .sub { font-size: 13px; color: #5b7099; margin-top: 4px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin: 9px 0; font-size: 14px; }
.bar-row .name { width: 150px; flex: none; color: #24406f; font-weight: 600; }
.bar-row .track { display: block; flex: 1; background: #eef2f9; border-radius: 5px; height: 20px; overflow: hidden; }
.bar-row .fill { display: block; background: #1f5ed3; height: 100%; border-radius: 5px; min-width: 2px; }
.bar-row .amt { width: 130px; flex: none; text-align: right; color: #5b7099; font-variant-numeric: tabular-nums; }

/* ── source guide ──────────────────────────────────────────────────────── */
.source-known { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.source-known > div { border-radius: 9px; padding: 15px 17px; border: 1px solid; }
.source-known h3 { font-size: 15px; margin: 0 0 7px; }
.source-known p { font-size: 13.5px; margin: 5px 0; }
.source-known-good { background: var(--green-bg); border-color: #b9dfcc !important; }
.source-known-good h3 { color: var(--green); }
.source-known-bad { background: var(--red-bg); border-color: var(--red-line) !important; }
.source-known-bad h3 { color: var(--red); }

.source-tester {
  background: var(--blue-soft); border: 1px solid #c7d8f4; border-radius: 9px;
  padding: 17px; margin: 20px 0 4px;
}
.source-tester > label { font-size: 16px; }
.source-tester > .hint { margin: 0 0 10px; }
.source-test-row { display: flex; gap: 10px; align-items: stretch; }
.source-test-row input { flex: 1; min-width: 0; }
.source-test-row .btn { white-space: nowrap; }
.source-test-reasons { margin-top: 9px; font-size: 13px; }
.source-free-note {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid currentColor;
  font-size: 12.5px; font-weight: 700;
}

.source-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-top: 18px;
}
.source-summary-card {
  border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe;
  padding: 14px 16px; display: flex; flex-direction: column;
}
.source-summary-card span {
  color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.source-summary-card strong { color: var(--navy); font-size: 28px; line-height: 1.2; margin: 4px 0; }
.source-summary-card small { color: var(--muted); font-size: 12.5px; }

.source-group { margin-top: 24px; }
.source-group:first-child { margin-top: 4px; }
.source-group > h3 {
  color: var(--navy); font-size: 16px; margin: 0 0 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.source-store { border: 1px solid var(--line); border-radius: 9px; padding: 15px 16px; background: #fff; }
.source-store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.source-store-head h4 { color: var(--navy); font-size: 16px; margin: 1px 0 8px; word-break: break-word; }
.source-status {
  display: inline-block; white-space: nowrap; border-radius: 20px; padding: 3px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--blue-soft); color: var(--blue);
}
.source-status.reliable, .source-status.working { background: var(--green-bg); color: var(--green); }
.source-status.mixed, .source-status.thin, .source-status.retry { background: var(--amber-bg); color: var(--amber); }
.source-status.avoid { background: var(--red-bg); color: var(--red); }
.source-stats { color: var(--ink); font-size: 13.5px; }
.source-stats > div { margin: 3px 0; }
.source-latest { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.source-latest a, .source-table a { color: var(--blue); word-break: break-all; }
.source-issue {
  background: var(--red-bg); color: var(--red); border-radius: 6px;
  padding: 8px 10px; margin-top: 10px; font-size: 12.5px;
}
.source-table-wrap { overflow-x: auto; }
.source-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.source-table th {
  text-align: left; color: var(--navy); background: #f4f7fc;
  padding: 9px 10px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.source-table td { padding: 10px; border-bottom: 1px solid #edf1f7; vertical-align: top; min-width: 105px; }
.source-table td:nth-child(2) { min-width: 250px; }
.source-table td:last-child { min-width: 240px; }

@media (max-width: 700px) {
  .source-known { grid-template-columns: 1fr; }
  .ebay-form-grid { grid-template-columns: 1fr; }
  .ebay-policy-grid { grid-template-columns: 1fr; }
  .source-test-row { flex-direction: column; }
  .source-test-row .btn { width: 100%; }
}

/* ── guide ─────────────────────────────────────────────────────────────── */
.guide { line-height: 1.65; }
.guide .lead { font-size: 17px; color: #24406f; margin: 0 0 22px; }
.guide h3 {
  font-size: 19px; color: #0f2f66; margin: 34px 0 12px;
  padding-top: 22px; border-top: 1px solid #e6ecf5;
}
.guide h4 { font-size: 16px; color: #0f2f66; margin: 0 0 6px; }
.guide p { margin: 0 0 10px; }
.guide code {
  background: #eef2f9; padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.guide .note { font-size: 14px; color: #5b7099; }

.guide .rule {
  background: #fff6ee; border-left: 4px solid #f7761e; border-radius: 0 8px 8px 0;
  padding: 16px 20px; margin: 20px 0;
}
.guide .rule.good { background: #eef4ff; border-left-color: #1f5ed3; }
/* Only the box's opening line is a heading; bold inside the sentences must stay inline. */
.guide .rule > strong:first-child { display: block; color: #0f2f66; margin-bottom: 6px; font-size: 16px; }

.guide ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.guide ol.steps > li {
  counter-increment: s; position: relative;
  padding: 0 0 22px 52px; margin: 0;
}
.guide ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #1f5ed3; color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.guide ol.steps > li:not(:last-child)::after {
  content: ''; position: absolute; left: 16px; top: 38px; bottom: 6px;
  width: 2px; background: #e0e8f4;
}

.guide table { border-collapse: collapse; width: 100%; margin: 6px 0 14px; font-size: 15px; }
.guide table th {
  text-align: left; background: #f4f7fc; color: #0f2f66; font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px;
  border-bottom: 2px solid #dde5f2;
}
.guide table td { padding: 10px 12px; border-bottom: 1px solid #eef2f9; vertical-align: top; }
.guide table.numbers tr.best { background: #eef4ff; font-weight: 600; }
.guide table td.free { color: #157a4a; font-weight: 700; }
.guide table.sites td { width: 50%; }

.guide .pill {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.guide .pill.err { background: #fdeaea; color: #a51f1f; }
.guide .pill.warn { background: #fff4e2; color: #8a5200; }
.guide .pill.info { background: #eef2f9; color: #40567d; }
.guide table.flagtable td:first-child { width: 110px; }

.guide ul.tips { padding-left: 20px; margin: 0 0 10px; }
.guide ul.tips li { margin-bottom: 9px; }
.guide .closing {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid #e6ecf5;
  color: #5b7099; font-size: 15px;
}
.spend-card.over { border-color: #e2b4b4; background: #fdf4f4; }
.spend-card.over .value { color: #a51f1f; }
.budget-track { margin-top: 10px; height: 6px; border-radius: 3px; background: #e4ebf6; overflow: hidden; }
.budget-track span { display: block; height: 100%; background: #1f5ed3; border-radius: 3px; }
.spend-card.over .budget-track span { background: #c0392b; }

/* ── who's signing in ──────────────────────────────────────────────────── */
.who { display: flex; flex-wrap: wrap; gap: 8px; }
.who button {
  flex: 1 1 0; min-width: 88px; appearance: none; cursor: pointer;
  border: 1px solid #dde5f2; background: #fbfcfe; border-radius: 10px;
  padding: 14px 10px; font: inherit; font-weight: 600; color: #24406f;
}
.who button:hover { border-color: #9fb8de; background: #f4f7fc; }
.who button.on { background: #1f5ed3; border-color: #1f5ed3; color: #fff; }

/* Height / width / depth at checkpoint 1. Three short boxes on one line - they are read and
   filled as a set, so stacking them full width would make a set of measurements look like
   three unrelated questions. */
.dims { display: flex; gap: 12px; flex-wrap: wrap; }
.dims label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-weight: 600; color: #33415c;
}
.dims input { width: 92px; margin: 0; }
.dims input.hand-entered { border-color: #d98324; background: #fffaf3; }

.image-picker { user-select: none; }
.image-picker img { -webkit-user-drag: none; }

/* Compact audit and source views. */
#approved-audit > summary, #view-sources details > summary { cursor:pointer; font-size:1.25rem; font-weight:700; color:var(--navy, #193166); padding:8px 0; }
.reliability-table { max-height:65vh; overflow:auto; margin-top:20px; }
.reliability-table thead { position:sticky; top:0; background:#f3f6fc; z-index:1; }
.reliability-table td:last-child { max-width:340px; font-size:.88rem; }
.ebay-mode-switch { margin-bottom:20px; }
[data-preview] { cursor:help; }
.approval-hover-preview { position:fixed; right:20px; width:min(520px, calc(100vw - 40px)); max-height:min(600px, calc(100vh - 24px)); overflow:auto; padding:20px; background:white; border:1px solid #dce4f4; border-radius:14px; box-shadow:0 12px 50px #152b6040; z-index:1000; pointer-events:none; }
.approval-hover-preview h3 { margin:0 0 12px; }
.hover-image-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.hover-image-grid img { width:100%; height:120px; object-fit:contain; background:#f6f7fa; border-radius:8px; }
.hover-flags { font-size:.85rem; color:#956019; }

.listing-bulk > summary { cursor:pointer; padding:20px 24px; font-size:1.15rem; font-weight:700; color:#193166; background:white; border:1px solid #dce4f4; border-radius:12px; margin-bottom:20px; }
.approval-hover-preview { box-sizing:border-box; right:auto; }

.image-folder-settings { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; }

.embedded-bulk { padding:18px 0; border-top:1px solid #dce4f4; }
.product-gallery { display:flex; flex-wrap:wrap; gap:16px; }
.product-gallery img { width:180px; height:180px; object-fit:contain; }
.listing-bulk > summary { display:none; }

.source-price-row { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:16px; align-items:end; }
@media(max-width:600px) { .source-price-row { grid-template-columns:1fr; } }

.image-folder-help { flex-basis:100%; font-size:14px; color:var(--muted, #64748b); }
.image-folder-help summary { cursor:pointer; color:#315fd3; font-weight:600; }
.image-folder-help ol { padding-left:22px; margin:12px 0; }
.image-folder-help li { margin:6px 0; }
.image-folder-help p { margin:8px 0 0; }

.title-tools { justify-content:space-between; margin:6px 0 14px; }
.title-tools .hint { margin:0; font-size:12px; }
