/* Collectr-style surface. Loaded after app.css. Visual only. */

:root {
  --bg: #070b14;
  --panel: #0e1726;
  --raised: #152238;
  --ink: #eef3f8;
  --muted: #8b9cb3;
  --gold: #2ee0c5;
  --gold-soft: rgba(46, 224, 197, 0.12);
  --good: #3dce7a;
  --warn: #e2b15a;
  --bad: #ff5c6c;
  --line: #1c2a40;
  --line-strong: #2c4260;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --shadow-card: none;
  --shadow-card-hover: none;
  --glow-gold: 0 0 0 1px rgba(46, 224, 197, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --accent: #2ee0c5;
  --accent-ink: #062821;
  --pill: #e7fff8;
}

body.daylight {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --raised: #e8eef6;
  --ink: #101826;
  --muted: #5c6d84;
  --gold: #0c8f7a;
  --gold-soft: rgba(12, 143, 122, 0.1);
  --good: #147a45;
  --warn: #8a5a12;
  --bad: #c43444;
  --line: #d5e0ec;
  --line-strong: #b7c6d8;
  --shadow: 0 12px 32px rgba(16, 24, 38, 0.06);
  --glow-gold: 0 0 0 1px rgba(12, 143, 122, 0.35);
  --accent: #0c8f7a;
  --accent-ink: #ffffff;
  --pill: #0c8f7a;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(46, 224, 197, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 224, 197, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.daylight {
  background-image:
    linear-gradient(rgba(16, 24, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 38, 0.035) 1px, transparent 1px);
}

h1, h2, h3, .mobile-brand, .brand-mark, .brand-name, .profit-number {
  font-family: inherit;
}

h1, h2 {
  font-weight: 650;
  letter-spacing: -0.02em;
}

a { color: var(--accent); }
a:hover { color: var(--accent); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Full-bleed header, constrained workspace. */
.app-shell {
  display: block;
  max-width: none;
  margin: 0;
  min-height: 100dvh;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 58px;
  padding: 0 max(18px, calc((100vw - 1120px) / 2)) 0 max(18px, calc((100vw - 1120px) / 2 + 4px));
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(16px);
}

body.daylight .rail {
  background: rgba(244, 247, 251, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 0;
  min-height: 44px;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(46, 224, 197, 0.08);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-mark span { color: var(--accent); }

.brand-name {
  display: inline;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.rail nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.nav-button {
  flex-direction: row;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}

.nav-button svg { display: none; }
.nav-button { padding: 8px 10px 10px; }

#page-discover .hero-copy .eyebrow { display: none; }

.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
}

/* Compact list rows: identity flows on the left, money sits in a right column. */
.opportunity {
  display: flow-root;
  grid-template-columns: none;
  grid-template-areas: none;
  padding: 12px 14px 10px;
  row-gap: 0;
  column-gap: 0;
}

.profit-row,
.tile-metrics,
.tile-actions {
  float: right;
  clear: right;
  width: 196px;
  margin: 0 0 6px 16px;
  text-align: right;
}

.listing-head,
.shipping-line,
.downside-line,
.review-reasons,
.tile-bottom {
  margin-right: 212px;
}

.listing-head { align-items: flex-start; }

.profit-row { margin-bottom: 2px; }
.profit-row .small {
  font-size: 10px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.tile-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  justify-content: end;
  margin-bottom: 8px;
}

.tile-metrics div { line-height: 1.25; }
.tile-metrics strong { font-size: 13px; }

.shipping-line,
.downside-line {
  display: inline;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.downside-line::before { content: " · "; }

.review-reasons {
  display: block;
  margin: 4px 212px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.tile-bottom { margin-top: 2px; min-height: 0; }
.tile-bottom .quiet { min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.tile-actions .quiet, .tile-actions .ebay-button { min-height: 32px; }

.price-age { font-size: 11px; color: var(--muted); }

.nav-button.active,
.nav-button.active:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.rail-foot { display: none; }

.workspace {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  right: max(10px, calc((100vw - 1120px) / 2));
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
}

.mobile-brand { display: none; }

.connection {
  color: var(--muted);
  font-size: 12px;
  max-width: 220px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  animation: none;
}

.currency-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.icon-button {
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border-color: transparent;
  color: var(--muted);
}

.icon-button:hover {
  background: var(--raised);
  color: var(--ink);
  border-color: transparent;
}

.page {
  padding: 22px 18px 28px;
  animation: none;
}

/* Search card — the page, not a marketing hero. */
.search-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: none;
}

.page-heading.hero-heading {
  margin: 0 0 12px;
}

.hero-copy h1 {
  max-width: none;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero-copy .eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.hero-copy .lede {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.display-break { display: none; }

.searchbar {
  margin-top: 14px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: #0a101b;
  border-color: var(--line-strong);
  box-shadow: none;
}

body.daylight .searchbar { background: #f4f7fb; }

.searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.searchbar input {
  font-size: 14px;
  min-height: 40px;
}

.searchbar .primary,
.primary,
.ebay-button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--accent-ink);
  border-color: var(--pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.primary:hover,
.searchbar .primary:hover,
.ebay-button:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--accent-ink);
  filter: none;
  text-decoration: none;
}

body.daylight .primary,
body.daylight .searchbar .primary,
body.daylight .ebay-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.daylight .primary:hover,
body.daylight .ebay-button:hover {
  background: #0a7564;
  border-color: #0a7564;
  color: #fff;
}

.starter-queries--hero { margin: 14px 0 0; }
.suggested-searches { display: grid; gap: 10px; }
.suggested-searches__group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.suggested-searches__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 4px;
}
@media (max-width: 700px) {
  .suggested-searches__group { align-items: flex-start; }
  .suggested-searches__label { flex-basis: 100%; }
}

.chip {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.chip.active,
.hunt-chips .chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--gold-soft);
}

.simple-hint {
  margin: 10px 0 0;
  font-size: 12px;
}

.simple-hint .quiet[data-action="settings"] { color: var(--accent); }

.quiet { color: var(--muted); }
.quiet:hover { color: var(--ink); background: transparent; border-color: transparent; }

.scan-summary {
  gap: 8px;
  margin: 14px 0;
}

.scan-summary > div {
  background: var(--panel);
  border-radius: 12px;
  padding: 12px 14px;
}

.scan-summary strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

/* Tabs read as text, not chunky pills. */
.feedbar {
  margin: 8px 0 10px;
  align-items: flex-end;
}

.segmented {
  gap: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.segmented button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.segmented .active,
.segmented button.active {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.segmented button span {
  color: var(--muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.segmented .active span { color: var(--accent); }

#sort, .feedbar > #sort {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 36px;
  color: var(--ink);
}

/* Dense horizontal deal rows. */
.feed { gap: 8px; }

.opportunity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 240px);
  grid-template-areas:
    "head profit"
    "ship metrics"
    "down metrics"
    "reasons actions"
    "bottom actions";
  column-gap: 18px;
  row-gap: 2px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: none;
  transform: none;
}

.feed.has-results .opportunity { animation: none; }

.opportunity:hover,
.opportunity.selected:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-strong);
  background: #111c2e;
}

body.daylight .opportunity:hover { background: #f8fbfe; }

.opportunity.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.listing-head {
  grid-area: head;
  gap: 12px;
  align-items: center;
}

img.listing-photo {
  display: block;
  width: 52px;
  height: 72px;
  object-fit: contain;
  background: #0a101b;
}

.listing-title h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.listing-title p { margin: 0 0 1px; font-size: 12px; }

.tag {
  margin-top: 6px;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-color: var(--line);
}

.margin-tag { color: var(--good); border-color: rgba(61, 206, 122, 0.45); }

.profit-row {
  grid-area: profit;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0;
  text-align: right;
  gap: 2px;
}

.profit-row .small { font-size: 11px; }

.profit-number,
.opportunity .profit-number,
#page-discover .profit-number {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.multiple {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.multiple strong {
  display: block;
  color: var(--good);
  font-size: 13px;
}

.tile-metrics {
  grid-area: metrics;
  border: 0;
  padding: 0;
  margin: 0;
  gap: 10px 14px;
  justify-content: flex-end;
}

.tile-metrics div { font-size: 11px; text-align: right; }
.tile-metrics strong { font-size: 13px; font-weight: 650; margin-top: 1px; }

.shipping-line { grid-area: ship; margin: 4px 0 0; font-size: 12px; }
.downside-line { grid-area: down; margin: 0; font-size: 12px; }
.review-reasons { grid-area: reasons; margin: 4px 0 0; font-size: 12px; color: var(--warn); }

.tile-bottom {
  grid-area: bottom;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.tile-bottom .quiet { color: var(--accent); padding-left: 0; }

.tile-actions {
  grid-area: actions;
  border: 0;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  align-self: end;
}

.ebay-button { white-space: nowrap; }

.empty-state,
.empty-state.first-use {
  border-style: solid;
  border-color: var(--line);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: none;
  padding: 36px 24px;
  text-align: left;
}

.empty-state h2 {
  font-size: 18px;
  font-weight: 650;
}

.empty-state p:not(.eyebrow) {
  margin-left: 0;
  max-width: 46rem;
}

.empty-icon::before { display: none; }

.results-tools {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.results-tools > summary { color: var(--muted); }
.results-tools[open] > summary { color: var(--accent); }

dialog {
  border-radius: 14px;
  border-color: var(--line);
  background: var(--panel);
}

.workspace-footer {
  margin: 8px 18px 28px;
  max-width: none;
  border-top-color: var(--line);
}

.footer-links a:hover { color: var(--accent); }

.doc-page h1, .doc-page h2 { font-family: inherit; }
.doc-brand .brand-mark { font-size: 13px; }

.page,
.hero-copy > *,
.feed.has-results .opportunity,
.status-dot,
.detail-panel.open {
  animation: none !important;
}

@media (max-width: 1190px) {
  .app-shell { grid-template-columns: none; max-width: none; }
  .rail { padding-left: 16px; padding-right: 16px; }
  .topbar { right: 8px; }
  .workspace { max-width: none; }
}

@media (max-width: 860px) {
  .opportunity { display: block; }
  .profit-row,
  .tile-metrics,
  .tile-actions,
  .listing-head,
  .shipping-line,
  .downside-line,
  .review-reasons,
  .tile-bottom {
    float: none;
    clear: none;
    width: auto;
    margin-right: 0;
    text-align: left;
  }
  .profit-row,
  .tile-metrics,
  .tile-metrics div,
  .multiple { text-align: left; align-items: flex-start; justify-content: flex-start; }
  .tile-actions { justify-content: flex-start; margin-top: 8px; }
  .review-reasons { margin-right: 0; }
}

@media (max-width: 700px) {
  .app-shell { display: block; padding-bottom: 0; max-width: none; }
  .rail { display: none; }
  .workspace { max-width: none; }
  .topbar {
    position: relative;
    top: auto;
    right: auto;
    height: auto;
    min-height: 56px;
    width: 100%;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.94);
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }
  body.daylight .topbar { background: rgba(244, 247, 251, 0.96); }
  .mobile-brand {
    display: block;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .top-actions { position: static; }
  .connection { display: none; }
  .page { padding: 16px 14px 20px; }
  .search-panel { padding: 14px; }
  .hero-copy h1 { font-size: 16px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar .primary { min-height: 44px; }
  .opportunity { padding: 12px; }
  .listing-photo { width: 48px; height: 66px; }
  .profit-number, .opportunity .profit-number { font-size: 22px; }
  .ebay-button { white-space: normal; }
  .workspace-footer { margin: 8px 14px 20px; }
  .currency-chip { height: 32px; }
  }

  .desk {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
  }
  .game-rail {
    position: sticky;
    top: 58px;
    align-self: start;
    max-height: calc(100dvh - 70px);
    overflow: auto;
    padding: 10px 8px 20px;
    border-right: 1px solid var(--line);
  }
  .game-label {
    margin: 12px 4px 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .game-button {
    width: 100%;
    min-height: 42px;
    margin: 0 0 4px;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    flex-direction: column;
    gap: 0;
  }
  .game-button span { font-size: 11px; font-weight: 750; letter-spacing: 0.04em; }
  .game-button small { font-size: 10px; font-weight: 550; }
  .game-button.active,
  .game-button.active:hover {
    color: var(--accent);
    background: rgba(46, 224, 197, 0.1);
  }
  .currency-chip select {
    width: auto;
    min-height: 28px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
    padding: 0 2px;
  }
  .market-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
  @media (max-width: 700px) {
    .desk { display: block; max-width: none; }
    .game-rail {
      position: static;
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      max-height: none;
      border-right: 0;
      border-bottom: 1px solid var(--line);
      padding: 8px;
    }
    .game-label { flex-basis: 100%; margin: 2px 4px; }
    .game-button { width: auto; flex-direction: row; gap: 6px; padding: 6px 10px; }
  }

@media (min-width: 861px) {
  .opportunity {
    display: flow-root;
    padding: 12px 14px 10px;
  }
  .profit-row,
  .tile-metrics,
  .tile-actions {
    float: right;
    clear: right;
    width: 200px;
    margin: 0 0 8px 18px;
    text-align: right;
  }
  .listing-head,
  .shipping-line,
  .downside-line,
  .review-reasons,
  .tile-bottom {
    margin-right: 218px;
  }
  .shipping-line,
  .downside-line { display: block; margin-top: 2px; }
  .downside-line::before { content: none; }
  .tile-bottom { justify-content: flex-start; }
  .tile-actions .ebay-button { flex: 1 0 100%; margin-left: 0; }
  .review-reasons { margin-right: 218px; }
  .tile-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 10px;
    height: auto;
  }
  .tile-metrics div { width: auto; text-align: right; }
  .tile-metrics strong { display: inline; margin-left: 4px; font-size: 12px; }
  .tile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px 8px;
    width: 210px;
  }
  .tile-actions .ebay-button { margin-left: auto; }
  .tile-actions .quiet { white-space: nowrap; padding: 4px 2px; min-height: 32px; }
  .profit-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    gap: 2px 8px;
    height: auto;
  }
  .profit-row > div { display: contents; }
  .profit-row .small { flex-basis: 100%; font-size: 10px; }
  .multiple, .multiple strong { display: inline; }
}
