/* Dibs board. Palette and components from ios/Sources/Views/Theme.swift so the
   board and the app are one product. Layout follows the DIBS Board design:
   priced auctions get cards, unscored auctions get a demoted list. */
:root {
  --ground:#E6E8E6;
  --surface:#FFFFFF;
  --sunken:#D8DBD8;
  --ink:#080708;
  --muted:#5C5F5C;
  --rule:#C9CCC9;
  --rule-strong:#AEB2AE;
  --accent:#3772FF;
  --accent-fill:#FDCA40;
  --bad:#DF2935;
  --good:#1E8E3E;
  --on-primary:#FFFFFF;
}

* { box-sizing:border-box; }
body {
  margin:0; background:var(--ground); color:var(--ink);
  font-family:'Archivo', system-ui, -apple-system, sans-serif;
}
a { color:inherit; text-decoration:none; }
.mono, .label { font-family:'IBM Plex Mono', ui-monospace, monospace; }

/* header — blue field, yellow rule beneath it */
.bar {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:24px 32px; background:var(--accent); border-bottom:3px solid var(--accent-fill);
}
.wordmark { font-weight:700; font-size:26px; letter-spacing:-.5px; color:#FFFFFF; }
.status {
  display:flex; align-items:center; gap:8px; color:rgba(255,255,255,.88);
  font:400 10px/1.3 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing:1px; text-transform:uppercase;
}
.dot { width:6px; height:6px; border-radius:50%; display:inline-block; }
/* The app's LiveDot: slow, shallow, only on something genuinely running. */
.dot.live { background:var(--accent-fill); animation:beat 1.3s ease-in-out infinite alternate; }
.dot.off { background:rgba(255,255,255,.5); }
@keyframes beat { from { opacity:1; } to { opacity:.35; } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation:none; } }
.stamp { padding-left:8px; border-left:1px solid rgba(255,255,255,.3); }
.bar-left { display:flex; align-items:center; gap:28px; min-width:0; }
/* The two boards. The yellow rule under the header doubles as the active
   tab's underline, so the tab sits on it rather than floating in the bar. */
.boards { display:flex; align-items:stretch; gap:4px; align-self:stretch; margin-block:-24px; }
.board-tab {
  display:flex; align-items:center; padding:0 14px; white-space:nowrap;
  font:600 14px/1 'Archivo', system-ui, sans-serif; letter-spacing:.1px;
  color:rgba(255,255,255,.78); border-bottom:3px solid transparent; margin-bottom:-3px;
}
.board-tab:hover { color:#FFFFFF; background:rgba(255,255,255,.08); }
.board-tab.on { color:#FFFFFF; border-bottom-color:#FFFFFF; }
.board-tab:focus-visible { outline:2px solid var(--accent-fill); outline-offset:-4px; }
.bar-right { display:flex; align-items:center; gap:16px; }
.nav-form { display:flex; align-items:center; gap:14px; }
.nav-link {
  font:400 11px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px;
  color:rgba(255,255,255,.88);
}
button.nav-link.as-link {
  background:none; border:0; padding:0; cursor:pointer; font-family:inherit; font-size:inherit;
  letter-spacing:inherit; color:inherit;
}

/* one line of context for a cold visitor, plus the only CTA the site makes */
.intro {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 32px; background:var(--surface); border-bottom:1px solid var(--rule);
  flex-wrap:wrap;
}
.intro p { margin:0; font-size:12px; line-height:1.4; color:var(--muted); max-width:640px; }
.badge {
  flex:0 0 auto; font:500 9px/1.4 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing:.6px; text-transform:uppercase; padding:4px 9px; border-radius:20px;
  background:var(--accent-fill); color:var(--ink); white-space:nowrap;
}

/* controls — server-rendered, so they work with no client JavaScript */
.controls {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 32px; background:var(--surface); border-bottom:1px solid var(--rule);
  flex-wrap:wrap;
}
.sort { display:flex; align-items:center; gap:8px; }
.sort .label {
  font-size:9px; letter-spacing:1.2px; text-transform:uppercase; color:var(--muted);
}
.tab {
  font:400 10px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px;
  border:1px solid var(--rule); border-radius:6px; padding:6px 9px; color:var(--muted);
}
.tab.on { background:var(--accent); border-color:var(--accent); color:var(--on-primary); }
.search { display:flex; align-items:center; gap:8px; }
.search input {
  font:400 11px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.3px;
  border:1px solid var(--rule); border-radius:8px; padding:8px 10px;
  background:var(--surface); color:var(--ink); width:220px; max-width:46vw;
}
.search .clear {
  font:400 9px/1 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing:.8px; text-transform:uppercase; color:var(--accent);
}

main { padding:24px 32px 48px; }
.section { margin-bottom:32px; }
.section-head {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-bottom:10px; flex-wrap:wrap;
  font:400 10px/1.3 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing:1.2px; text-transform:uppercase; color:var(--muted);
}
.toggle { color:var(--accent); font-size:9px; letter-spacing:.8px; }

/* priced — the comp is the point, so it gets the card. The outer .priced is
   plain chrome; .priced-link is the fast path straight to eBay (same tap
   target as the affiliate link), and .details-link is a smaller, secondary
   link to this row's own page -- never nested inside the same anchor. */
.grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px; }
.priced {
  display:flex; flex-direction:column; gap:2px; padding:10px;
  background:var(--surface); border-radius:14px;
  box-shadow:0 1px 2px rgba(8,7,8,.04), 0 8px 24px rgba(8,7,8,.08);
  transition:transform .1s ease, box-shadow .1s ease;
}
.priced:hover { transform:translateY(-1px); box-shadow:0 2px 4px rgba(8,7,8,.06), 0 12px 28px rgba(8,7,8,.12); }
.priced-link { display:flex; gap:10px; }
.card-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; padding-top:4px; }
.details-link {
  font:400 9px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px;
  text-transform:uppercase; color:var(--accent);
}
.details-link:hover { text-decoration:underline; }

/* save / watchlist controls -- a plain link when signed out, a same-page
   POST form when signed in, so both work with no client JavaScript */
.save-form { display:inline-flex; margin:0; }
.save-btn {
  font:500 9px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px;
  text-transform:uppercase; color:var(--muted); background:none; border:1px solid var(--rule);
  border-radius:20px; padding:4px 9px; cursor:pointer;
}
.save-btn.saved { color:var(--ink); border-color:var(--accent-fill); background:rgba(253,202,64,.25); }
.save-btn:hover { border-color:var(--rule-strong); }
/* The slab photo is the fastest way to recognise a listing, so give it room.
   3:4 is the card aspect; object-fit keeps odd seller crops from stretching. */
.art { width:64px; height:84px; flex:0 0 auto; border-radius:6px; object-fit:cover; background:var(--sunken); }
.art.blank { display:block; }
.card-body { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; gap:5px; }
.title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
/* The seller's full title, wrapped rather than truncated: for the rows the
   guide cannot identify, this is the only description there is. */
.title {
  font-weight:600; font-size:12.5px; line-height:1.3; overflow-wrap:anywhere;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.grade {
  font:400 9px 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing:.8px; text-transform:uppercase; color:var(--muted);
}
/* MarketPositionBadge: green under, grey at market, red over -- the price
   itself already goes green under market, so the badge agrees with it. */
.pos {
  flex:0 0 auto; padding:3px 8px; border-radius:8px; white-space:nowrap;
  font:500 9px/1.4 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px;
}
.pos.under { background:var(--good); color:var(--on-primary); }
.pos.at { background:var(--sunken); color:var(--ink); }
.pos.over { background:var(--bad); color:var(--on-primary); }

.meta-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.footer-row {
  display:flex; align-items:baseline; justify-content:space-between; gap:8px;
  padding-top:6px; border-top:1px solid var(--rule);
}
.bid-line { display:flex; align-items:baseline; gap:5px; }
.bid { font-weight:700; font-size:17px; font-variant-numeric:tabular-nums; }
.bid.under { color:var(--good); }
.bids { font-family:'IBM Plex Mono', ui-monospace, monospace; font-size:9px; color:var(--muted); }
.mkt-label {
  font-family:'IBM Plex Mono', ui-monospace, monospace; font-size:11px;
  color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap;
}
.ends {
  font:500 9px/1.3 'IBM Plex Mono', ui-monospace, monospace; color:var(--ink);
}
.ends.soon { color:var(--bad); }

/* unscored — demoted, never hidden */
.collapsed {
  padding:14px 16px; background:var(--sunken); border:1px solid var(--rule);
  border-radius:12px; font:400 11px/1.5 'IBM Plex Mono', ui-monospace, monospace; color:var(--muted);
}
.list { background:var(--surface); border:1px solid var(--rule); border-radius:12px; overflow:hidden; }
.unscored {
  display:flex; align-items:center; gap:12px; padding:9px 16px;
  border-bottom:1px solid var(--rule);
}
.unscored:last-child { border-bottom:0; }
.unscored:hover { background:var(--sunken); }
.art-sm { width:22px; height:28px; flex:0 0 auto; border-radius:5px; object-fit:cover; background:var(--sunken); opacity:.55; }
.art-sm.blank { display:block; }
.u-ident { flex:1; min-width:0; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
/* Demoted, but still the full title -- these rows are unidentified, so
   truncating the one description they have would leave nothing. */
.u-name { font-size:12px; font-weight:600; color:var(--muted); line-height:1.35; overflow-wrap:anywhere; }
.u-grade { font:400 9px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.5px; color:var(--muted); flex:0 0 auto; }
.u-bid { font:400 11px 'IBM Plex Mono', ui-monospace, monospace; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.u-bid span { color:var(--rule-strong); }
.u-flag {
  flex:0 0 auto; min-width:74px; text-align:right; white-space:nowrap; color:var(--rule-strong);
  font:400 9px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:1px; text-transform:uppercase;
}
/* One chip per rarity a seller never named, instead of a single guessed
   price -- see lob_pricing.ambiguous_rarity_prices. */
.rarity-chip {
  display:inline-block; padding:2px 6px; border-radius:6px;
  background:var(--sunken); color:var(--ink); letter-spacing:.3px;
}
.rarity-chip + .rarity-chip { margin-left:5px; }
.u-ends { width:52px; text-align:right; white-space:nowrap; font:400 9px 'IBM Plex Mono', ui-monospace, monospace; color:#8E938E; }

.empty { padding:64px 16px; text-align:center; }
.empty strong { display:block; font-size:19px; font-weight:600; letter-spacing:-.3px; }
.empty p { max-width:460px; margin:8px auto 0; color:var(--muted); line-height:1.55; font-size:13px; }

/* item detail page — one auction, room for the numbers a card abbreviates */
.detail-page { padding:24px 32px 48px; max-width:760px; margin:0 auto; }
.back {
  display:inline-block; margin-bottom:16px; font:400 11px/1 'IBM Plex Mono', ui-monospace, monospace;
  color:var(--accent); letter-spacing:.4px;
}
.detail-main {
  display:flex; gap:20px; background:var(--surface); border-radius:16px; padding:20px;
  box-shadow:0 1px 2px rgba(8,7,8,.04), 0 8px 24px rgba(8,7,8,.08);
}
.detail-art { width:160px; height:216px; flex:0 0 auto; border-radius:10px; object-fit:cover; background:var(--sunken); }
.detail-art.blank { display:block; }
.detail-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:10px; }
.detail-title { margin:0; font-size:19px; font-weight:700; line-height:1.3; letter-spacing:-.2px; }
.detail-identity { font:400 11px/1.4 'IBM Plex Mono', ui-monospace, monospace; color:var(--muted); letter-spacing:.4px; }
.detail-badges { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.detail-prices { display:flex; gap:24px; padding-top:8px; border-top:1px solid var(--rule); flex-wrap:wrap; }
.price-block { display:flex; flex-direction:column; gap:2px; }
.price-label { font:400 9px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.price-value { font-weight:700; font-size:22px; font-variant-numeric:tabular-nums; }
.price-value.under { color:var(--good); }
.price-sub { font:400 10px 'IBM Plex Mono', ui-monospace, monospace; color:var(--muted); }
.detail-note { margin:0; font-size:12px; line-height:1.55; color:var(--muted); }
.cta {
  align-self:flex-start; margin-top:4px; padding:10px 18px; border-radius:10px;
  background:var(--accent); color:var(--on-primary); font-weight:600; font-size:13px;
}
.cta:hover { opacity:.92; }
.detail-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }

/* account page's watchlist rows -- same chrome as the unscored list */
.watch-row { display:flex; align-items:center; gap:12px; padding:9px 16px; border-bottom:1px solid var(--rule); }
.watch-row:last-child { border-bottom:0; }
.watch-row .u-ident { flex:1; min-width:0; }
.watch-row .details-link { flex:0 0 auto; }

/* login / signup */
.auth-page { display:flex; justify-content:center; padding:48px 16px; }
.auth-card {
  width:100%; max-width:360px; background:var(--surface); border-radius:16px; padding:28px;
  box-shadow:0 1px 2px rgba(8,7,8,.04), 0 8px 24px rgba(8,7,8,.08);
}
.auth-title { margin:0 0 16px; font-size:19px; font-weight:700; letter-spacing:-.2px; }
.auth-error {
  margin:0 0 14px; padding:8px 12px; border-radius:8px; background:rgba(223,41,53,.1);
  color:var(--bad); font-size:12px; line-height:1.4;
}
.auth-form { display:flex; flex-direction:column; gap:14px; }
.auth-form label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.auth-form input {
  font:400 13px/1 'Archivo', system-ui, sans-serif; border:1px solid var(--rule); border-radius:8px;
  padding:9px 10px; background:var(--surface); color:var(--ink);
}
.auth-form .cta { border:0; width:100%; text-align:center; margin-top:4px; }
.auth-alt { margin:16px 0 0; font-size:12px; color:var(--muted); text-align:center; }
.auth-alt a { color:var(--accent); }

footer { margin-top:32px; padding-top:20px; border-top:1px solid var(--rule); }
footer p { margin:0; font:400 9px/1.7 'IBM Plex Mono', ui-monospace, monospace; letter-spacing:.4px; color:var(--muted); }
footer .links { display:flex; gap:14px; margin-top:6px; }
footer .links a { text-decoration:underline; }

@media (max-width:1000px) {
  .grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:640px) {
  .bar, .controls, .intro { padding-left:16px; padding-right:16px; }
  .bar { padding-block:16px; flex-wrap:wrap; row-gap:0; }
  .bar-left { gap:14px; }
  .boards { margin-block:-16px; }
  .board-tab { padding:0 9px; font-size:13px; min-height:54px; }
  .wordmark { font-size:22px; }
  .status .stamp { display:none; }
  main { padding:16px 16px 40px; }
  .grid { grid-template-columns:1fr; }
  .unscored { gap:8px; padding:7px 10px; }
  /* The countdown is the first thing to go when the row runs out of width. */
  .u-ends { display:none; }
  .detail-page { padding:16px 16px 40px; }
  .detail-main { flex-direction:column; padding:16px; }
  .detail-art { width:100%; height:auto; aspect-ratio:3/4; }
  .bar-right { gap:10px; }
  .nav-form { gap:10px; }
  .auth-page { padding:32px 16px; }
  .auth-card { padding:20px; }
}
