/*
 * "Slab" theme for the eBay hub and everything under it (/admin/ebay*) -
 * scoped entirely under body.ebay-body so nothing here leaks elsewhere, same
 * pattern as gridiron.css (body.gridiron-body) and war_room.css
 * (body.war-room-body). Loaded automatically by stylesheet_link_tag :app
 * (Propshaft includes every file under app/assets/stylesheets), so no <link>
 * wiring beyond the Google Fonts import in the view's content_for(:head).
 *
 * This section is about graded trading cards, not football (gridiron.css) or
 * a tactical draft console (war_room.css), so it borrows neither of those
 * themes' colors or type. The palette is an invented "house" grading-label
 * identity, not a copy of any real grading company's trademarked colors -
 * antique gold label foil with dark ink text (oxblood-on-light read poorly
 * for the client, so oxblood was demoted to a hover-only accent rather than
 * a filled label background) and felt-green (the display-case felt cards
 * get shown on at card shows, currently unused but reserved) on a warm
 * near-black "holder" shell with card faces close to white (a true cream
 * read poorly against label text at this contrast level, so this leans much
 * closer to white than a literal aged-cardboard tone).
 * Each nav tile is shaped like a card in a graded holder (2.5:3.5 aspect
 * ratio) sitting in a binder pocket, not a generic dashboard card.
 *
 * Bootstrap's stylesheet double-loads on every page (stylesheet_link_tag :app
 * globs vendor/bootstrap.min.css a second time after application.css) and
 * carries !important on its utility classes, so any override needs matching
 * !important plus a two-class-deep selector - same pattern documented in
 * gridiron.css/war_room.css.
 */

/* Bootstrap's .container caps out at a fixed per-breakpoint max-width
   (1140px at lg, 1320px at xxl, etc.) rather than scaling with the
   viewport - too cramped for wide tables like the Collection listing (now
   with a Tags column). Widened to a fluid 80% on desktop-sized screens
   only; narrower screens keep Bootstrap's normal responsive behavior,
   where a fixed width would just make things worse. Applies to every
   eBay-section page (all share body.ebay-body), not just Collection. */
@media (min-width: 992px) {
  body.ebay-body .container {
    max-width: 80% !important;
  }
}

body.ebay-body {
  --eb-shell: #1C1712;
  --eb-stock: #FCFBF6;
  --eb-oxblood: #7A2331;
  --eb-felt: #1E4638;
  --eb-foil: #C9A758;
  --eb-ink: #2B2620;

  background: var(--eb-shell);
  color: var(--eb-stock);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* The site-wide footer (league links, player news ticker) is rendered by
   the shared application layout on every admin page - not specific to this
   section, so it's hidden here with CSS rather than touched at the layout
   level, which would affect every other admin page too. */
body.ebay-body footer {
  display: none;
}

body.ebay-body h1 {
  font-family: "Abril Fatface", Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  margin: 0;
  color: var(--eb-stock);
}

/*
 * Shared masthead (shared/_ebay_masthead), sitting above every page's own
 * heading. The background is a faceted, hard-edged angled pattern rather
 * than a soft gradient wash - it's a direct nod to a modern parallel card's
 * refractor/prizm foil (Prizm/Optic/Chrome), the one genuinely "shiny
 * modern card" visual this hobby actually has, not a decorative effect
 * invented for this UI. Kept low-opacity and slim (52px) so it reads as
 * texture, not a hero banner - "minimal screen real estate" was the brief.
 */
.ebay-masthead {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 1rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(252, 251, 246, 0.12);
  background:
    repeating-linear-gradient(
      115deg,
      rgba(201, 167, 88, 0.16) 0px, rgba(201, 167, 88, 0.16) 18px,
      rgba(122, 35, 49, 0.14) 18px, rgba(122, 35, 49, 0.14) 34px,
      rgba(30, 70, 56, 0.14) 34px, rgba(30, 70, 56, 0.14) 52px,
      transparent 52px, transparent 70px
    ),
    var(--eb-shell);
}

.ebay-masthead-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--eb-stock);
  text-decoration: none;
}

.ebay-masthead-icon {
  width: 18px;
  height: 24px;
  color: var(--eb-foil);
  flex-shrink: 0;
}

.ebay-masthead-word {
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.ebay-masthead-brand:hover .ebay-masthead-word {
  color: var(--eb-foil);
}

.ebay-hub-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.ebay-hub-back {
  color: var(--eb-stock);
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.9rem;
}

.ebay-hub-back:hover {
  opacity: 1;
  color: var(--eb-foil);
}

.ebay-binder-page {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ebay-slab {
  display: flex;
  flex-direction: column;
  flex: 0 1 220px;
  max-width: 100%;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 10px;
  overflow: hidden;
  background: var(--eb-stock);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ebay-slab:hover {
  border-color: var(--eb-oxblood);
  box-shadow: 0 0 0 1px var(--eb-oxblood), 0 10px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .ebay-slab {
    transition: none;
  }
}

.ebay-slab-label {
  background: var(--eb-foil);
  padding: 0.6rem 0.9rem;
  border-bottom: 3px solid var(--eb-shell);
}

.ebay-slab-label-title {
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 1.1rem;
  color: var(--eb-ink);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ebay-slab-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.9rem;
  color: var(--eb-ink);
}

.ebay-slab-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.ebay-slab-stat {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--eb-oxblood);
  border: 1px solid var(--eb-oxblood);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

/*
 * Reskins the shared sortable/searchable data table (shared/_data_table +
 * data_table_controller.js, already used as-is by Players/Leagues) rather
 * than forking it - only the surface colors change here, all sorting/search/
 * pagination behavior is untouched. Safe to add plain overrides (no
 * !important/extra specificity needed) since gridiron.css's rules are all
 * scoped to body.gridiron-body, which never applies on these admin pages.
 */
body.ebay-body .card {
  background: var(--eb-stock);
  color: var(--eb-ink);
  border: none;
}

body.ebay-body .form-control {
  background: var(--eb-stock);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: var(--eb-ink);
}

body.ebay-body .form-control:focus {
  background: var(--eb-stock);
  color: var(--eb-ink);
  border-color: var(--eb-foil);
  box-shadow: 0 0 0 0.2rem rgba(201, 167, 88, 0.35);
}

/*
 * NOT a blanket .text-muted override: it's used both directly on the dark
 * shell (e.g. the data table's row count) and nested inside cream .card/
 * .list-group-item surfaces on the Deal Alerts pages - a single color can't
 * serve both without going illegible in one of the two contexts. Bootstrap's
 * default muted gray already reads acceptably against both (~4.2:1 against
 * the shell, comfortably more against cream), so it's left alone; only the
 * row count gets its own lighter treatment since it's the one place muted
 * text sits directly on the darkest part of the shell with nothing else
 * behind it.
 */
body.ebay-body .data-table-row-count {
  color: rgba(252, 251, 246, 0.65);
}

body.ebay-body .nav-tabs {
  --bs-nav-link-color: var(--eb-stock);
  --bs-nav-link-hover-color: var(--eb-foil);
  --bs-nav-tabs-border-color: rgba(252, 251, 246, 0.25);
  --bs-nav-tabs-link-active-color: var(--eb-ink);
  --bs-nav-tabs-link-active-bg: var(--eb-stock);
  --bs-nav-tabs-link-active-border-color: rgba(252, 251, 246, 0.25) rgba(252, 251, 246, 0.25) var(--eb-stock);
}

body.ebay-body .btn-primary {
  --bs-btn-bg: var(--eb-oxblood);
  --bs-btn-border-color: var(--eb-oxblood);
  --bs-btn-hover-bg: #611b27;
  --bs-btn-hover-border-color: #611b27;
  --bs-btn-active-bg: #611b27;
  --bs-btn-active-border-color: #611b27;
}

/* Opt-in lighter button (see Add Card's submit button) - oxblood-on-near-
   black above reads fine for a button sitting on a lighter card body, but
   has too little contrast for one sitting directly on this theme's own
   near-black page background. */
body.ebay-body .ebay-btn-light {
  --bs-btn-bg: var(--eb-stock);
  --bs-btn-border-color: var(--eb-stock);
  --bs-btn-color: var(--eb-ink);
  --bs-btn-hover-bg: var(--eb-foil);
  --bs-btn-hover-border-color: var(--eb-foil);
  --bs-btn-hover-color: var(--eb-ink);
}

body.ebay-body .form-select {
  background-color: var(--eb-stock);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: var(--eb-ink);
}

body.ebay-body .form-select:focus {
  background-color: var(--eb-stock);
  color: var(--eb-ink);
  border-color: var(--eb-foil);
  box-shadow: 0 0 0 0.2rem rgba(201, 167, 88, 0.35);
}

/* Summary stats row above the collection/sold tables - reuses the same
   cert-label texture (Special Elite, oxblood) as .ebay-slab-stat elsewhere,
   just laid out as a row of labeled figures instead of a single small chip. */
.ebay-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.ebay-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ebay-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(252, 251, 246, 0.6);
}

.ebay-stat-value {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.05rem;
  color: var(--eb-foil);
}

/* Per-row tag chip picker on the eBay CSV import review page
   (admin/ebay_csv_imports/preview, see tag_picker_controller.js). Custom
   classes only, no Bootstrap .btn/.form-control mixed in - deliberately, so
   there's no Bootstrap !important to fight per the note at the top of this
   file. The table sits inside .table-responsive (overflow-x only), so the
   popover can safely position: absolute without being clipped vertically;
   it can still clip horizontally for a row near the right edge of a narrow
   viewport, which is an accepted tradeoff rather than a full repositioning
   library for what's an internal admin tool. */
.ebay-tag-cell {
  position: relative;
  min-width: 150px;
}

.ebay-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.ebay-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--eb-felt);
  color: var(--eb-stock);
  border: 1px solid var(--eb-foil);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.ebay-tag-chip-remove {
  background: none;
  border: none;
  color: var(--eb-stock);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 0.85rem;
}

.ebay-tag-add-btn {
  background: none;
  border: 1px dashed var(--eb-foil);
  color: var(--eb-foil);
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
}

.ebay-tag-add-btn:hover {
  background: var(--eb-oxblood);
  color: var(--eb-stock);
  border-color: var(--eb-oxblood);
}

.ebay-tag-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  width: 210px;
  background: var(--eb-ink);
  border: 1px solid var(--eb-foil);
  border-radius: 6px;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ebay-tag-search {
  width: 100%;
  background: var(--eb-shell);
  color: var(--eb-stock);
  border: 1px solid var(--eb-foil);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.ebay-tag-options {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ebay-tag-option {
  background: none;
  border: none;
  color: var(--eb-stock);
  text-align: left;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.ebay-tag-option:hover {
  background: var(--eb-oxblood);
}

.ebay-tag-option-create {
  color: var(--eb-foil);
  font-style: italic;
}

/* Marks where the CSV import review table (admin/ebay_csv_imports/preview)
   crosses into dates already covered by the tracked collection - see
   EbayPurchaseHistoryImportService.last_tracked_purchase_date. table-striped
   assigns nth-child backgrounds with !important, so this needs the same
   !important override the top-of-file note describes. */
tr.ebay-cutoff-divider td {
  background: var(--eb-felt) !important;
  color: var(--eb-foil);
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.4rem;
}

/* Finances page (admin/collection_items/finances). Reuses .ebay-stats-bar's
   figures as-is, just split into a Bought block and a Sold block under their
   own headings - as one undifferentiated strip there's nothing to say which
   of nine numbers are purchases and which are sales. */
.ebay-ledger {
  margin-bottom: 2.25rem;
}

.ebay-ledger-title {
  font-family: "Abril Fatface", Georgia, serif;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--eb-foil);
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(201, 167, 88, 0.3);
}

.ebay-ledger-note {
  font-size: 0.78rem;
  color: rgba(252, 251, 246, 0.6);
}

/* A loss needs to read as one at a glance, and foil-on-near-black doesn't.
   Bootstrap's .text-danger is the wrong red here (too dark against this
   shell), hence a lighter one of this theme's own. */
.ebay-stat-loss {
  color: #E8857F;
}

/* Hobby News (admin/hobby_news) - a plain reverse-chronological headline
   list rather than the shared Tabulator table: there's nothing to sort or
   paginate here, and a scannable column of headlines reads much better
   than cells. */
.ebay-news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ebay-news-filter {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--eb-stock);
  text-decoration: none;
  border: 1px solid rgba(252, 251, 246, 0.25);
  border-radius: 3px;
  padding: 0.25rem 0.7rem;
}

.ebay-news-filter:hover {
  border-color: var(--eb-foil);
  color: var(--eb-foil);
}

.ebay-news-filter.is-active {
  background: var(--eb-foil);
  border-color: var(--eb-foil);
  color: var(--eb-ink);
}

.ebay-news-filter-count {
  opacity: 0.7;
  margin-left: 0.3rem;
}

.ebay-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ebay-news-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(252, 251, 246, 0.12);
}

.ebay-news-headline {
  color: var(--eb-stock);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.ebay-news-headline:hover {
  color: var(--eb-foil);
}

.ebay-news-meta {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.72rem;
  color: rgba(252, 251, 246, 0.55);
  margin-top: 0.25rem;
}

.ebay-news-source {
  color: var(--eb-foil);
}

.ebay-news-dot {
  margin: 0 0.3rem;
}

.ebay-news-summary {
  font-size: 0.85rem;
  color: rgba(252, 251, 246, 0.7);
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

.ebay-news-footnote {
  font-size: 0.75rem;
  color: rgba(252, 251, 246, 0.5);
  margin-top: 1.5rem;
}

/* Recently-imported stories on the auto-refreshing news page - see
   HobbyNewsArticle#newly_added? (server-decided, so it survives a reload)
   and news_refresh_controller.js. The left rule is the at-a-glance cue;
   the badge names it for anyone who doesn't read colour. */
.ebay-news-item.is-new {
  border-left: 3px solid var(--eb-foil);
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.ebay-news-new {
  display: inline-block;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--eb-foil);
  color: var(--eb-ink);
  border-radius: 2px;
  padding: 0.05rem 0.35rem;
  margin-right: 0.45rem;
  vertical-align: 0.05em;
}

/* Manage News Feeds table (admin/news_feeds). Sits on a cream .card, so
   these read against light, unlike the news list's own on-shell styles. */
.ebay-feed-name {
  color: var(--eb-ink);
  font-weight: 600;
  text-decoration: none;
}

.ebay-feed-name:hover {
  color: var(--eb-oxblood);
  text-decoration: underline;
}

.ebay-feed-kind {
  display: inline-block;
  margin-left: 0.25rem;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  padding: 0.05rem 0.35rem;
}

.ebay-feed-error {
  font-size: 0.72rem;
  color: var(--eb-oxblood);
  margin-top: 0.15rem;
}

/* Small print under a feed's name on the manage-feeds page - secondary to
   the feed name and the figures beside it, so it stays out of the way
   until something is actually wrong. */
.ebay-feed-checked {
  font-size: 0.7rem;
  color: #6b6558;
  margin-top: 0.1rem;
}

/* Column headings on the split news page. Deliberately quieter than the
   page's own h1 - they label two halves of one list, they aren't new
   sections competing with it. */
.ebay-news-column-title {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eb-foil);
  border-bottom: 1px solid rgba(201, 167, 88, 0.3);
  padding-bottom: 0.35rem;
  margin-bottom: 0.25rem;
}

.ebay-news-column-title span {
  color: rgba(252, 251, 246, 0.45);
  margin-left: 0.3rem;
}

/* Price history chart on a card's valuation page. Series colour is
   #AD8A33: the theme's foil gold stepped down until it cleared the
   dark-mode lightness band and 3:1 against the shell - the foil itself
   sits at L 0.74, too light to pass.
   
   Everything below renders inside body.ebay-body .card, which is
   --eb-stock, so the text and axis colours are ink tones. They were
   near-white originally - written for the dark shell - which made the
   headline price, the axis labels and the gridlines invisible, the same
   defect that hid the grade ladder directly above it on this page. */
.ebay-chart {
  --chart-series: #AD8A33;
}

.ebay-chart-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.ebay-chart-now {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.3rem;
  color: var(--eb-ink);
}

.ebay-chart-change {
  font-size: 0.8rem;
}

/* Direction is named in the text ("+$12.00" / "-$12.00") as well as
   coloured, so it never rests on colour alone. Both are re-picked for
   the light card: the dark-shell pair (#7FB069 / #E8857F) sat at 2.44:1
   and 2.50:1 here, against 6.12:1 and 9.60:1 for these. */
.ebay-chart-change.is-up,
.ebay-market-change.is-up { color: #2F6B45; }
.ebay-chart-change.is-down,
.ebay-market-change.is-down { color: var(--eb-oxblood); }

.ebay-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Recessive: the grid is a reference, not the subject. */
.ebay-chart-grid {
  stroke: rgba(43, 38, 32, 0.15);
  stroke-width: 1;
}

.ebay-chart-axis {
  fill: #6b6558;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ebay-chart-line {
  fill: none;
  stroke: var(--chart-series);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Faint on purpose: gold at any real opacity over the near-black shell
   reads as a solid brown mass and competes with the line, which is the
   data. This is just enough to give the line a sense of magnitude. */
.ebay-chart-area {
  fill: var(--chart-series);
  opacity: 0.06;
  stroke: none;
}

.ebay-chart-dot {
  fill: var(--chart-series);
  /* Surface ring so a dot stays legible where it sits on the line - the
     surface is the light card, not the shell. */
  stroke: var(--eb-stock);
  stroke-width: 2;
}

/* Invisible, but gives the tooltip a target bigger than the 4px dot. */
.ebay-chart-hit {
  fill: transparent;
}

.ebay-chart-hit:hover + .ebay-chart-dot {
  r: 6;
}

.ebay-chart-empty {
  font-size: 0.85rem;
  color: #6b6558;
  margin: 0;
}

.ebay-chart-table {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #6b6558;
}

.ebay-chart-table summary {
  cursor: pointer;
  color: var(--eb-foil);
}

.ebay-chart-table table {
  width: 100%;
  margin-top: 0.5rem;
  border-collapse: collapse;
}

.ebay-chart-table th,
.ebay-chart-table td {
  text-align: left;
  padding: 0.2rem 0.6rem 0.2rem 0;
  border-bottom: 1px solid rgba(252, 251, 246, 0.1);
}

/* Unmatched-cards report. The hint under each heading is the point of
   the page - a list of failures nobody can act on is just a list. */
.ebay-unmatched-hint {
  font-size: 0.8rem;
  color: #6b6558;
  margin-bottom: 0.75rem;
}

/* Type-to-filter box above the Card Hedge link tables. Capped in width
   because it reads as a search field, not a full-width text input. */
.ebay-filter-box input[type="search"] {
  max-width: 26rem;
  border: 1px solid #cfc7b6;
  background: #fffdf7;
}

.ebay-filter-box input[type="search"]:focus {
  border-color: var(--eb-oxblood);
  box-shadow: none;
}

.ebay-unmatched-missing {
  color: var(--eb-oxblood);
  font-style: italic;
}

.ebay-ledger-link {
  color: var(--eb-foil);
}

/* Grade ladder on a card's valuation page. A bar per grade rather than
   a plain table: the shape of the jump from raw to a top grade is the
   point, and a column of numbers hides it. */
.ebay-ladder {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ebay-ladder-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 6rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.18rem 0;
}

/*
 * Both the ladder and the Worth Grading report below sit inside
 * body.ebay-body .card, whose background is --eb-stock (#FCFBF6) with
 * --eb-ink text. These were originally written in near-white against the
 * dark shell, which made every one of them --eb-stock text on an
 * --eb-stock background - present in the DOM and completely invisible,
 * so the Worth Grading table appeared to show nothing but a player name
 * and the grade ladder read as a column of bare bars. Anything here is
 * on the light card: keep it in ink tones.
 */
.ebay-ladder-grade {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.78rem;
  color: #6b6558;
}

.ebay-ladder-bar {
  height: 10px;
  border-radius: 2px;
  background: #AD8A33;
  min-width: 2px;
}

.ebay-ladder-price {
  text-align: right;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--eb-ink);
}

/* The grade actually owned, so the ladder is read relative to it. */
.ebay-ladder-row.is-yours .ebay-ladder-grade,
.ebay-ladder-row.is-yours .ebay-ladder-price {
  color: var(--eb-oxblood);
  font-weight: 700;
}

.ebay-ladder-row.is-yours .ebay-ladder-bar {
  background: var(--eb-foil);
}

.ebay-ladder-upside {
  font-size: 0.9rem;
  color: var(--eb-ink);
  margin-bottom: 0.75rem;
}

.ebay-ladder-note {
  font-size: 0.75rem;
  color: #6b6558;
  margin: 0.75rem 0 0;
}

/* Worth Grading report. */
.ebay-grading-sub {
  font-size: 0.78rem;
  color: #5d564a;
}

.ebay-grading-grade {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.68rem;
  color: #6b6558;
  margin-left: 0.25rem;
}

/* The ceiling is context, not the recommendation - it recedes. */
.ebay-grading-ceiling {
  color: #6b6558;
}

/* Release calendar: a date gutter down the left with the product beside it,
   so scanning for "what's next" is a single vertical read. */
.ebay-release-month {
  font-family: "Special Elite", Georgia, serif;
  font-size: 0.95rem;
  color: var(--eb-oxblood);
  border-bottom: 1px solid #e2dccd;
  padding-bottom: 0.2rem;
  margin: 1rem 0 0.5rem;
}

.ebay-release-month:first-child {
  margin-top: 0.25rem;
}

.ebay-release-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ebay-release-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted #ded7c6;
}

.ebay-release-item:last-child {
  border-bottom: 0;
}

.ebay-release-date {
  flex: 0 0 4.2rem;
  font-family: "Special Elite", Georgia, serif;
  font-size: 0.85rem;
  color: var(--eb-oxblood);
  white-space: nowrap;
}

/* A month-only date must not read as an exact one. */
.ebay-release-date.is-approx {
  font-style: italic;
  opacity: 0.75;
}

.ebay-release-date.is-past {
  color: #8a8275;
}

.ebay-release-body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
}

.ebay-release-meta {
  display: block;
  font-size: 0.75rem;
  color: #6b6558;
}

.ebay-release-soon {
  color: var(--eb-oxblood);
  font-weight: 600;
}

.ebay-release-source {
  display: block;
  font-size: 0.74rem;
  color: #6b6558;
  text-decoration: none;
}

.ebay-release-source:hover {
  text-decoration: underline;
}

/* Market index tables. The up/down colours are shared with
   .ebay-chart-change above - both render on the light card, so both use
   the ink-tone pair rather than the dark-shell one. */
.ebay-market-change {
  font-family: "Special Elite", "Courier New", monospace;
}

/* Flat and absent are deliberately not green or red: a 0.00% day is not
   a gain, and an unreported window is not a loss. */
.ebay-market-change.is-flat,
.ebay-market-flat {
  color: #6b6558;
}

/* Market index sparklines. No axes - the table's own numeric columns
   carry the values - so this only has to show the shape. Direction is in
   the SVG's aria-label as well as the colour, and the signed percentage
   columns beside it say the same thing in text. */
.ebay-spark {
  display: block;
  overflow: visible;
}

.ebay-spark polyline {
  fill: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.ebay-spark.is-up polyline,
.ebay-spark.is-up circle { stroke: #2F6B45; fill: none; }
.ebay-spark.is-up circle { fill: #2F6B45; }

.ebay-spark.is-down polyline { stroke: var(--eb-oxblood); }
.ebay-spark.is-down circle { fill: var(--eb-oxblood); stroke: none; }

.ebay-spark-empty {
  color: #6b6558;
  font-size: 0.8rem;
}
