/* ---- Fonts: Geist and Geist Mono (SIL Open Font License), self-hosted so no third party is contacted ------------ */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---- Tokens ----------------------------------------------------------------------------------
   Each colour is a light/dark pair: light-dark(light, dark). By default the page follows the system setting;
   the footer toggle sets data-theme="light" or "dark" on <html> to override it (see theme.js). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f5f4f1, #141413); --surface: light-dark(#ffffff, #1b1b1a); --surface-2: light-dark(#faf9f7, #212120); --sunken: light-dark(#efede8, #171716);
  --line: light-dark(#e8e5df, #2b2b29); --line-strong: light-dark(#d6d2ca, #3b3b38);
  --text: light-dark(#1b1916, #f3efe4); --muted: light-dark(#6a655d, #aaa79e); --subtle: light-dark(#98928a, #7f7d75);
  /* Palette: #218DAE, #2BBBD7, #FCE59A, #FFD758. Light mode uses a slightly deeper #218DAE so white button text stays readable;
     dark mode uses the bright #2BBBD7 with dark text. */
  --accent: light-dark(#1a7594, #2bbbd7); --accent-hover: light-dark(#135f7a, #52cfe6); --accent-soft: light-dark(#e2f3f8, #0f2f38);
  --accent-ink: light-dark(#14607a, #a8e8f4); --on-accent: light-dark(#ffffff, #04262e);
  /* Logo colours (the crate mark), and the yellow of the headline underline. */
  --mk1: light-dark(#1a7594, #2bbbd7); --mk2: light-dark(#2bbbd7, #218dae); --mk3: #ffd758; --mk-ink: light-dark(#0f3a47, #2bbbd7); --hl: #ffd758;
  --ok: light-dark(#137a3d, #4ade80); --ok-soft: light-dark(#e4f4ea, #12271b);
  --bad: light-dark(#b42318, #f87171); --bad-soft: light-dark(#fdecea, #2d1614);
  --warn: light-dark(#8a5300, #ffd758); --warn-soft: light-dark(#fff3c4, #2b2508);
  --shadow: 0 1px 2px light-dark(rgb(27 25 22 / .05), rgb(0 0 0 / .4)), 0 6px 20px light-dark(rgb(27 25 22 / .05), rgb(0 0 0 / .3));
  --shadow-lg: 0 12px 40px light-dark(rgb(27 25 22 / .18), rgb(0 0 0 / .55));
  --radius: 14px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --link: light-dark(#1a7594, #62d4ea);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---- Base ------------------------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.small { font-size: 12.5px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 20px 32px; flex: 1; }

/* ---- Header / footer ------------------------------------------------------------------------- */
.app-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1240px; margin: 0 auto; height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.cf-a { fill: var(--mk1); } .cf-b { fill: var(--mk2); } .cf-y { fill: var(--mk3); } .cf-i { fill: var(--mk-ink); }
.brand .arrow { color: var(--link); margin: 0 5px; font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.uname { font-weight: 550; font-size: 13px; }
.site-foot { border-top: 1px solid var(--line); color: var(--subtle); font-size: 13px; }
.site-foot .foot-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-foot a { color: var(--muted); }

/* ---- Buttons & inputs ------------------------------------------------------------------------ */
button, .btn {
  white-space: nowrap;
  font: inherit; font-size: 13.5px; font-weight: 550; line-height: 1; min-height: 32px; padding: 0 12px;
  border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
button:hover:not(:disabled), .btn:hover { background: var(--surface-2); border-color: var(--subtle); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgb(26 117 148 / .3); }
.primary:hover:not(:disabled), .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ghost:hover:not(:disabled) { background: var(--sunken); border-color: transparent; color: var(--text); }
.ghost.danger:hover:not(:disabled) { color: var(--bad); background: var(--bad-soft); }
.sm, .mini { min-height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.inline { display: inline-flex; }
.lg { min-height: 48px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
button.link { background: none; border: 0; min-height: 0; padding: 0; color: var(--link); font-weight: 500; font-size: 13px; }
button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
button.bad { color: var(--bad); border-color: var(--bad); }

input, select {
  font: inherit; font-size: 13.5px; min-height: 34px; padding: 0 11px; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 8px; }
input:hover, select:hover { border-color: var(--subtle); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; padding: 0; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
input[type=checkbox]:disabled { cursor: not-allowed; }
.field { display: grid; gap: 5px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 550; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field input, .field select { width: 100%; }
.counter { font-weight: 500; color: var(--subtle); font-variant-numeric: tabular-nums; }
.money { position: relative; display: block; }
.money i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
.money input { padding-left: 26px; font-variant-numeric: tabular-nums; }

/* ---- Cards, steps, notices ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 18px 10px; }
.card-head h2 { font-size: 16px; }
.card-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 0 20px 20px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.steps { display: flex; align-items: center; list-style: none; margin: 0 0 16px; padding: 0; }
.step { display: flex; align-items: center; gap: 10px; color: var(--subtle); font-weight: 550; font-size: 13px; white-space: nowrap; }
.step + .step::before { content: ""; width: 44px; height: 2px; background: var(--line-strong); border-radius: 2px; margin: 0 14px; }
.dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); }
.step.current { color: var(--text); }
.step.current .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.done { color: var(--muted); }
.step.done .dot { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

.notice { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 3px; background: var(--surface-2); margin: 0 0 16px; font-size: 13px; }
.notice.error { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); border-left-color: var(--bad); }
.notice.info { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); border-left-color: var(--warn); }
.card > .notice, .card-body > .notice { margin: 0 20px 16px; }
.card-body > .notice { margin: 0 0 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 9px; border-radius: 999px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* ---- eBay account summary -------------------------------------------------------------------- */
.summary { margin: 0; display: flex; flex-wrap: wrap; gap: 16px 44px; padding: 4px 20px 20px; }
.summary > div { min-width: 0; }
.summary dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 4px; }
.summary dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; padding: 4px 20px 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px 20px; }

/* ---- Inventory list -------------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 0 18px 12px; }
.toolbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunken); border-radius: 11px; max-width: 100%; overflow-x: auto; }
.seg .tab { min-height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); box-shadow: none; white-space: nowrap; }
.seg .tab:hover:not(.active) { background: transparent; color: var(--text); }
.seg .tab.active { background: light-dark(var(--surface), var(--line-strong)); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); padding: 8px 12px; white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th:first-child, .list td:first-child { padding-left: 20px; width: 46px; }
.list th:last-child, .list td:last-child { padding-right: 20px; }
.list tbody tr { transition: background .12s; cursor: pointer; }
.list tbody tr:hover { background: var(--surface-2); }
.list tbody tr.sel { background: var(--accent-soft); }
.list tbody tr.done { cursor: default; }
.list tbody tr:last-child td { border-bottom: 0; }
.list .num, .list th.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.list th.num { font-weight: 600; }

.cover { width: 46px; height: 46px; border-radius: 6px; overflow: hidden; background: var(--sunken); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .07), 0 1px 3px rgb(0 0 0 / .15); flex: none; display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover svg { width: 26px; height: 26px; opacity: .35; }
.rel { min-width: 200px; }
.rel-artist { font-weight: 600; line-height: 1.3; }
.rel-title { color: var(--text); text-decoration: none; display: inline-block; line-height: 1.3; }
.rel-title:hover { color: var(--link); text-decoration: underline; }
.rel-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grades { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.grade { display: inline-flex; gap: 6px; align-items: baseline; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--sunken); color: var(--text); white-space: nowrap; }
.grade small { font-size: 11px; font-weight: 500; color: var(--muted); }
.grade.top { background: var(--ok-soft); color: var(--ok); }
.grade.low { background: var(--warn-soft); color: var(--warn); }
.grade.top small, .grade.low small { color: inherit; opacity: .75; }
.ebay-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 130px; }
.ebay-actions { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.ebay-actions a { text-decoration: none; }
.ebay-actions a:hover { text-decoration: underline; }
.fail-note { color: var(--bad); font-size: 12.5px; max-width: 250px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pager { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 14px 20px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 48px 20px 56px; color: var(--muted); border-top: 1px solid var(--line); }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

.skeleton-list { border-top: 1px solid var(--line); }
.skeleton-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--sunken) 25%, var(--line) 50%, var(--sunken) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk.box { width: 18px; height: 18px; } .sk.cover { width: 46px; height: 46px; border-radius: 6px; }
.sk.grow { flex: 1; display: grid; gap: 8px; background: none; animation: none; }
.sk.grow span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--sunken) 25%, var(--line) 50%, var(--sunken) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk.grow span:first-child { width: 42%; height: 14px; } .sk.grow span:last-child { width: 26%; }
.sk.pill { width: 90px; height: 22px; border-radius: 999px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Floating action bar --------------------------------------------------------------------- */
.bar { position: sticky; bottom: 16px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 14px 12px 20px; margin-top: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.bar-count { display: inline-flex; align-items: center; gap: 12px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ---- Review: one card per record ------------------------------------------------------------- */
.items { border-top: 1px solid var(--line); }
.item {
  display: grid; grid-template-columns: 60px minmax(0, 1fr) 280px; gap: 12px 18px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  grid-template-areas: "cover main nums" "cover title title" "cover foot foot" "box box box";
}
.item:last-child { border-bottom: 0; }
.item-cover { grid-area: cover; } .item-cover .cover { width: 60px; height: 60px; border-radius: 8px; }
.item-main { grid-area: main; min-width: 0; display: grid; gap: 3px; align-content: start; }
.item-name { font-size: 15.5px; line-height: 1.3; }
.item-meta { color: var(--muted); font-size: 13px; }
.item-links { color: var(--muted); font-size: 13px; }
.item-links a { color: var(--link); }
.item-main .badge { justify-self: start; margin-top: 4px; }
.item-nums { grid-area: nums; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.item-title { grid-area: title; }
.item-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.item-status { font-size: 13.5px; min-height: 20px; }
.item-details { grid-area: box; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.item-details[hidden] { display: none; }
.details-body { display: grid; gap: 14px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; }
.suggest span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.label-pick { display: grid; gap: 5px; max-width: 360px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.photos-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13.5px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.photo { position: relative; display: grid; gap: 6px; justify-items: center; }
.photo .thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; line-height: 0; border: 2px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--sunken); }
.photo .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s, filter .15s; }
.photo.on .thumb { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo.off .thumb img { opacity: .3; filter: grayscale(.7); }
.photo .check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: none; place-items: center; font-size: 12px; font-weight: 700; line-height: 1; }
.photo.on .check { display: grid; }
.photo .tag { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: var(--text); color: var(--bg); line-height: 1; }
.photo .link { min-height: 18px; }

/* ---- Landing --------------------------------------------------------------------------------- */
.hero { text-align: center; max-width: 680px; margin: 0 auto; padding: 48px 0 36px; }
.hero .hero-mark { width: 96px; height: 96px; margin: 0 auto; display: block; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.06; letter-spacing: -.045em; font-weight: 600; margin: 26px 0 14px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 16px; text-wrap: pretty; margin: 0 auto 28px; max-width: 560px; }
.fine { color: var(--subtle); font-size: 13px; margin-top: 14px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 8px 0 8px; }
.how-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.how-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.how-step h3 { font-size: 16px; margin-bottom: 6px; }
.how-step p { color: var(--muted); font-size: 14.5px; }

/* ---- Prose (privacy) ------------------------------------------------------------------------- */
.prose { max-width: 720px; }
.prose h1 { font-size: 28px; letter-spacing: -.035em; margin: 8px 0 4px; }
.prose h2 { font-size: 18px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose li { margin-bottom: 6px; }
.prose code { background: var(--sunken); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

/* ---- Responsive ------------------------------------------------------------------------------ */
@media (max-width: 860px) {
  .item { grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "cover main" "title title" "nums nums" "foot foot" "box box"; padding: 16px; }
  .item-cover .cover { width: 60px; height: 60px; }
  .hide-md { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 16px 14px 32px; }
  /* Inventory rows become compact cards instead of a scrolling table */
  .table-wrap { overflow: visible; }
  .list, .list tbody { display: block; }
  .list thead { display: none; }
  .list tbody tr { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; grid-template-areas: "chk cov rel price" ". . ebay ebay"; gap: 6px 12px; padding: 14px; border-bottom: 1px solid var(--line); }
  .list tbody tr:last-child { border-bottom: 0; }
  .list td, .list td:first-child, .list td:last-child { display: block; padding: 0; border: 0; width: auto; }
  .list td:nth-child(1) { grid-area: chk; padding-top: 16px; }
  .list td:nth-child(2) { grid-area: cov; }
  .list td:nth-child(3) { grid-area: rel; min-width: 0; }
  .list td:nth-child(4) { display: none; }
  .list td:nth-child(5) { grid-area: price; padding-top: 2px; }
  .list td:nth-child(6) { grid-area: ebay; }
  .cover { width: 44px; height: 44px; }
  .rel { min-width: 0; }
  .ebay-cell { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .fail-note { max-width: none; flex-basis: 100%; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
  .header-inner { padding: 0 14px; }
  .uname { display: none; }
  .step:not(.current) .step-label { display: none; }
  .step + .step::before { width: 22px; margin: 0 8px; }
  .card-head, .toolbar { padding-left: 14px; padding-right: 14px; }
  .list th:first-child, .list td:first-child { padding-left: 14px; }
  .list th:last-child, .list td:last-child { padding-right: 14px; }
  .hide-sm { display: none; }
  .settings, .summary, .form-actions { padding-left: 14px; padding-right: 14px; }
  .bar { bottom: 8px; padding: 10px 12px; }
  .hero { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.cover:not(.sk):empty::after { content: "◎"; font-size: 22px; color: var(--subtle); }
.prose .muted { margin-bottom: 16px; }

/* ---- Result banner (after listing) ------------------------------------------------------------ */
.result-slot:empty { display: none; }
.result-slot { padding: 0 20px 16px; scroll-margin-top: 76px; }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.result-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--sunken); }
.result-text { flex: 1 1 260px; display: grid; gap: 1px; min-width: 0; }
.result-text span { color: var(--muted); font-size: 13px; }
.result.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.result.ok .result-icon { background: var(--ok); color: var(--surface); }
.result.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.result.warn .result-icon { background: var(--warn); color: var(--surface); }
.result.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.result.bad .result-icon { background: var(--bad); color: var(--surface); }
.item.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.item.is-ok .item-title input, .item.is-ok .item-nums input { color: var(--muted); }
.item.is-failed { box-shadow: inset 3px 0 0 var(--bad); background: color-mix(in srgb, var(--bad-soft) 45%, transparent); }
.item [hidden], button[hidden] { display: none; }

/* ---- Search ---------------------------------------------------------------------------------- */
.search { position: relative; flex: 1 1 240px; max-width: 360px; margin-left: auto; }
.search input { width: 100%; padding-left: 36px; padding-right: 32px; }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.search .clear { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 26px; min-height: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; border-radius: 6px; }
.search .clear:hover:not(:disabled) { background: var(--sunken); color: var(--text); border: 0; }
.subbar { padding: 0 20px 12px; }
@media (max-width: 640px) { .search { flex-basis: 100%; max-width: none; } .subbar { padding: 0 14px 12px; } }

.field-hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.field-hint.bad { color: var(--bad); }
.item-nums .field { align-content: start; }
.site-row { align-items: end; padding-bottom: 14px; grid-template-columns: minmax(230px, 320px) minmax(0, 1fr); }
.site-note { padding-bottom: 9px; }
@media (max-width: 640px) { .site-row { grid-template-columns: 1fr; } .site-note { padding-bottom: 0; } }
.dup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.dup a { text-decoration: none; }
.dup a:hover { text-decoration: underline; }

/* ---- Sold on eBay ------------------------------------------------------------------------------ */
.sold-card { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.sales { border-top: 1px solid var(--line); }
.sale { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sale:last-child { border-bottom: 0; }
.sale-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); font-weight: 800; }
.sale-main { flex: 1 1 260px; min-width: 0; display: grid; gap: 1px; }
.sale-main strong { overflow-wrap: anywhere; }
.sale-main a { text-decoration: none; }
.sale-actions { margin-left: auto; }
@media (max-width: 640px) { .sale { padding: 14px; } .sale-actions { margin-left: 0; width: 100%; } }
.gone-card { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.gone-card .sale-icon { background: var(--warn-soft); color: var(--warn); }

/* ---- Price column: Discogs and eBay ------------------------------------------------------------ */
.price-cell { text-align: right; }
.price-line { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-line + .price-line { margin-top: 2px; font-weight: 550; }
.price-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.price-line.differs { color: var(--warn); }

/* ---- Navigation ---------------------------------------------------------------------------------- */
.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 18px; }
.nav-link { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 550; }
.nav-link:hover:not(.active) { background: var(--sunken); color: var(--text); border: 0; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 640px) { .brand-name { display: none; } .nav { margin-left: 8px; } }

/* ---- Sales history -------------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 0 20px 16px; }
.tile { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 2px; }
.tile-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.tile-value { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sold-list .sold-meta { white-space: nowrap; }
.sold-list .sold-meta .badge::before { display: none; }
.sold-list .sold-status { min-width: 190px; }
.sold-list .sold-status > * { margin-right: 8px; }
@media (max-width: 640px) {
  .tiles { padding: 0 14px 14px; }
  .sold-list tbody tr { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "cov item price" ". meta meta" ". status status"; }
  .list.sold-list td:nth-child(1) { grid-area: cov; padding-top: 0; }
  .list.sold-list td:nth-child(2) { grid-area: item; }
  .list.sold-list td:nth-child(3) { grid-area: meta; display: flex; align-items: center; gap: 8px; }
  .list.sold-list td:nth-child(4) { grid-area: price; display: block; }
  .list.sold-list td:nth-child(5) { grid-area: status; }
}

/* ---- Footer: links and theme choice ---------------------------------------------------------------- */
.foot-links { display: flex; gap: 18px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 10px; }
.theme-toggle .seg .tab { min-height: 26px; padding: 0 11px; font-size: 12.5px; }
.theme-label { font-size: 12.5px; }

/* ---- Contact page -------------------------------------------------------------------------------- */
.contact { max-width: 640px; }
.contact h1 { font-size: 28px; letter-spacing: -.035em; margin: 8px 0 6px; }
.contact .lede { margin: 0 0 22px; max-width: none; }
.contact-form { display: grid; gap: 16px; padding: 22px; }
textarea { font: inherit; font-size: 13.5px; padding: 10px 12px; width: 100%; resize: vertical; min-height: 140px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); line-height: 1.5; }
textarea:hover { border-color: var(--subtle); }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-status { font-size: 13px; color: var(--muted); }
.form-status.bad { color: var(--bad); }
.thanks { display: flex; align-items: center; gap: 14px; padding: 26px 22px; }
.thanks[hidden], .contact-form[hidden] { display: none; }
.thanks .result-icon { background: var(--ok); color: var(--surface); }
.thanks p { margin: 2px 0 0; }

/* Headline highlight: a yellow underline stroke (the palette's #FFD758) behind the key words, same text colour as the rest. */
.mark { background: linear-gradient(transparent 70%, var(--hl) 70% 92%, transparent 92%); padding: 0 .1em; margin: 0 -.1em; border-radius: 3px; }
