

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 13, 21, 0.78);
  cursor: zoom-out;
}

.image-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1280px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  overflow: visible;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.image-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.image-lightbox__title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.image-lightbox__title span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.image-lightbox__title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.image-lightbox__close {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox__close::before,
.image-lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.image-lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.image-lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible:not([data-focus-quiet]) {
  background: var(--surface-3);
  border-color: rgba(38, 95, 170, 0.35);
}

.image-lightbox__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: var(--photo-bg);
  overflow: hidden;
}

.image-lightbox__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* «Адмін» (task 129, _AdminMenu): since task 156 a disclosure at the end of the desktop's «⋯» (_SetMenu), its items
   one step in; wide enough for «Закінчити перевірку оголошень» on one line, a form a row. */
.set-admin > summary {
  list-style: none;
}

.set-admin > summary::-webkit-details-marker {
  display: none;
}

.set-admin > summary::after {
  content: "▾" / "";
  margin-left: auto;
  color: var(--text-muted);
}

.set-admin__list {
  display: grid;
  gap: 2px;
  padding-left: var(--space-3);
}

.set-admin__form,
.sp-more__list form {
  margin: 0;
}

.sp-more__list {
  min-width: 260px;
}

/* Not judged wrong, just unconfirmed for too long to price from — muted rather than warning-coloured,
   because the listing may well still exist; we simply stopped being able to vouch for it. */
.offer-status--stale {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.10);
}

.set-detail-minifigures__row {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.set-detail-minifigure {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  flex: 0 0 206px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.set-detail-minifigure--owned {
  border-color: rgba(25, 135, 84, 0.55);
  background: var(--good-bg); /* a light-green gradient before: 1.1–2.2 : 1 text in the dark theme (impeccable detect, task 156) */
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.12);
}

.set-detail-minifigure--owned .set-detail-minifigure__image {
  border-right-color: rgba(25, 135, 84, 0.32);
  background: var(--photo-bg);
}

.set-detail-minifigure__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 104px;
  overflow: hidden;
  background: var(--photo-bg);
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.set-detail-minifigure__image img {
  width: 100%;
  height: 100%;
  padding: var(--photo-inset);
  object-fit: contain;
  object-position: center;
}

.set-detail-minifigure__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 9px;
}

.set-detail-minifigure__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.set-detail-minifigure__code {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-detail-minifigure__code:hover {
  color: var(--accent-text);
}

.set-detail-minifigure__qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--up);
  background: var(--good-bg);
  font-size: var(--text-sm);
  font-weight: 800;
}

.set-detail-minifigure__owned {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 18px;
  margin-top: 5px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--up);
  background: var(--good-bg);
  border: 1px solid rgba(25, 135, 84, 0.22);
  font-size: var(--text-sm);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.set-detail-minifigure__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  margin-top: 5px;
  color: var(--up);
  font-size: var(--text-sm);
  font-weight: 850;
  line-height: 1;
}

.set-detail-minifigure__value span,
.set-detail-minifigure__value small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-detail-minifigure__value small {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 750;
}

.set-detail-minifigure__name {
  margin-top: 6px;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.16;
}

.content-section {
  padding: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.chart-shell {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.chart-layout {
  display: block;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 620px;
}

/* Wraps (task 156): at --text-sm, eleven chips on one line cut both the names and the values. */
.chart-side-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  margin-top: 12px;
  overflow: visible;
  padding-bottom: 0;
}

.chart-side-legend-item {
  flex: 1 1 150px;
  min-width: 0;
  display: flex;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 6px 7px;
  text-align: left;
  color: inherit;
}

.chart-side-legend-item.is-hidden {
  opacity: 0.52;
}

.chart-side-legend-swatch {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 10px;
}

.chart-side-legend-swatch::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  border-top: 2px var(--legend-line-style, solid) var(--legend-color);
}

.chart-side-legend-swatch.is-zone::before {
  inset: 1px 0;
  border: 1px var(--legend-line-style, solid) var(--legend-color);
  border-radius: 3px;
  background: var(--legend-fill-color);
}

.chart-side-legend-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

/* The legend's words and values at the type scale's --text-sm: 0.72 / 0.70 rem were 10.1 / 9.8 px, under 11 px
   (`impeccable detect`, task 156). */
.chart-side-legend-label {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-side-legend-value {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-chart {
  width: 100%;
  height: 620px;
  display: block;
}

.offers-table {
  margin: 0;
  width: 100%;
}

/* The table sits on its section's card, not in a card of its own (task 156: a card in a card, `impeccable detect`). */
.offers-table-shell {
  overflow: hidden;
}

.offers-table thead th {
  white-space: nowrap;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-width: 1px;
}

.offers-table td,
.offers-table th {
  vertical-align: middle;
}

.offers-col-provider {
  width: 180px;
}

.offers-col-title {
  width: auto;
}

.offers-col-price {
  width: 220px;
}

.offers-col-action {
  width: 110px;
}

.offers-table .offer-title {
  font-weight: 600;
}

/* The state under the title (task 156: the «Статус» column went — empty on most rows), only when it is not the usual one. */
.offers-table .offer-title + .offer-status {
  display: inline-flex;
  margin-top: 4px;
}

.offers-table .offer-note {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.offers-action-cell {
  text-align: right;
}

.offer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.offer-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.offer-action-button:hover,
.offer-action-button:focus {
  text-decoration: none;
  transform: translateY(-1px);
}

.offer-action-button--open {
  color: var(--accent-text);
  border-color: rgba(37, 99, 235, 0.35);
}

.offer-action-button--accept {
  color: var(--good);
  border-color: color-mix(in srgb, var(--up) 35%, var(--surface-1));
}

.offer-action-button--accept.is-selected {
  color: #fff;
  background: var(--good);
  border-color: var(--good);
}

.offer-action-button--reject {
  color: var(--bad);
  border-color: #f1b4b4;
}

.offer-action-button--reject.is-selected {
  color: #fff;
  background: var(--bad);
  border-color: var(--bad);
}

.offer-action-button--reset {
  color: var(--muted);
}

/* «Повідомити про помилку в ціні» (task 148): anybody's, beside ↗. */
.offer-action-button--report {
  color: var(--muted);
}

/* «бачили 12 хв тому» under an offer's title (task 148). */
.offers-table .offer-seen {
  margin-top: 4px;
  font-size: var(--text-sm); /* 10.9 px at 0.78rem: under 11 px, `impeccable detect` (task 156) */
  color: var(--text-muted);
}

.offer-review-note {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--accent-text);
  font-weight: 700;
}

.offer-review-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
}

.offer-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.offer-status--active {
  color: var(--good);
  background: var(--good-bg);
  border-color: color-mix(in srgb, var(--up) 35%, var(--surface-1));
}

.offer-status--inactive {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--surface-1));
}

.offer-status--filtered {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: #f1b78c;
}

.offer-status--reviewed {
  color: var(--good);
  background: var(--good-bg);
  border-color: color-mix(in srgb, var(--up) 35%, var(--surface-1));
}

.offer-status--rejected {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: #f1b4b4;
}

.dt-layout-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dt-layout-table {
  margin-top: 10px;
}

.dt-search {
  width: min(360px, 100%);
}

.dt-search label {
  display: none;
}

.dt-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.dt-column-nowrap {
  white-space: nowrap;
}

.dt-container .table > :not(caption) > * > * {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.offer-row--best {
  background: var(--up-bg);
}

/* A provider's best row: its mark ringed in --up (task 163; the green pill before). */
.offer-row--best .ui-provider__tile {
  outline: 2px solid var(--up);
  outline-offset: 2px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.empty-state,
.empty-inline {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .page-hero,
  .summary-grid,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .chart-layout {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-canvas-wrap {
    min-height: 460px;
  }

  .price-chart {
    height: 460px;
  }

  .offers-table-shell {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .page-hero,
  .content-section,
  .summary-stat {
    padding: 16px;
  }

  .hero-field-grid {
    grid-template-columns: 1fr;
  }

  .hero-action-card__button {
    width: 100%;
  }

  .dt-search {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox__panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  .image-lightbox__image-wrap {
    padding: 12px;
  }

  .image-lightbox__image-wrap img {
    max-width: 100%;
    max-height: 100%;
  }
}

/* ── The phone (task 105) ─────────────────────────────────────────────────────────────────────────────────────────
   One column. A row of the page's parts (.set-jump, _Desktop) is held under the header; the photo, the head and the
   price block one under another (.sp-top, task 156); the offers table is a card per offer (≤ 900: at 768 its seven
   columns left the sort icons 12 px wide — five since task 156); every
   control is a finger's 44 px. ≤ 900 px only: the desktop is as it was.
   The 414 px the page was at 390 (task 100) were the sales windows' pace pill and the offers table. */
.set-jump {
  display: none;
}

@media (max-width: 900px) {
  .set-jump {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top, 0px));
    z-index: 9;
    display: flex;
    max-width: none;
    margin: -8px -12px 12px;
    scroll-padding-inline: 12px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
  }

  .set-jump__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch);
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: var(--text-md);
    font-weight: 600;
    white-space: nowrap;
  }

  .set-jump__link:active {
    background: var(--surface-3);
    color: var(--text);
  }

  /* A jump lands under the header and the row, not behind them. */
  .set-detail-page [id^="set-"] {
    scroll-margin-top: calc(120px + env(safe-area-inset-top, 0px));
  }

  .offer-action-button {
    width: var(--touch);
    height: var(--touch);
  }

  .set-detail-page .dt-search input {
    min-height: var(--touch);
  }

  .chart-side-legend-item {
    min-height: var(--touch);
  }

  .price-chart,
  .chart-canvas-wrap {
    height: 360px;
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .sales-windows__head {
    flex-wrap: wrap;
  }

  .sales-windows__pace {
    white-space: normal;
  }

  .price-chart,
  .chart-canvas-wrap {
    height: 300px;
    min-height: 300px;
  }
}

@media (max-width: 900px) {
  /* The offers: a card per offer — provider and price on the first line, the title with the seller and the place
     under them (with the state when it is not the usual one), then the actions. DataTables keeps the table; its head is read to screen readers only. */
  .offers-table-shell {
    padding: 0 12px;
    overflow: visible;
  }

  #offers-table colgroup {
    display: none;
  }

  #offers-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #offers-table,
  #offers-table tbody {
    display: block;
    width: 100% !important;
  }

  #offers-table tbody tr {
    display: grid;
    grid-template-areas:
      "provider price"
      "title title"
      "action action";
    grid-template-columns: minmax(0, 1fr) fit-content(55%);
    align-items: center;
    gap: 6px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  #offers-table tbody tr:last-child {
    border-bottom: 0;
  }

  #offers-table tbody td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    white-space: normal;
  }

  #offers-table tbody td.offer-provider { grid-area: provider; }
  #offers-table tbody td.offer-main { grid-area: title; }
  #offers-table tbody td.offer-price { grid-area: price; font-size: var(--text-lg); font-weight: 700; text-align: right; }
  #offers-table tbody td.offers-action-cell { grid-area: action; }

  #offers-table tbody td.offer-price .offer-note {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 400;
    white-space: normal;
  }
}

/* The deal score and the signal (task 147 / 156, Pages/Shared/Components/_DealScoreBreakdown, _SignalPanel) — two chips
   in the price block that open, the desktop's and the phone's. The breakdown's points cell is /Methodology's too. */
.sp-verdicts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-4);
}

.deal-score,
.set-signal {
  min-width: 0;
}

.deal-score[open],
.set-signal[open] {
  flex-basis: 100%;
}

.deal-score > summary,
.set-signal > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-sm);
  list-style: none;
  cursor: pointer;
}

.deal-score > summary::-webkit-details-marker,
.set-signal > summary::-webkit-details-marker {
  display: none;
}

/* The open / closed marker is part of the chip (task 156, after the first stand: it sat apart from it, beside the
   summary's edge); the summary around the chip is only the 44 px target. */
.deal-score__chip::after,
.set-signal__chip::after {
  content: "▾" / "";
  margin-left: var(--space-1);
}

.deal-score[open] .deal-score__chip::after,
.set-signal[open] .set-signal__chip::after {
  content: "▴" / "";
}

.deal-score__chip,
.set-signal__chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.set-signal__headline {
  margin: 0;
  font-weight: 600;
}

.set-signal__body {
  display: grid;
  gap: var(--space-2);
  max-width: 520px;
  padding-top: var(--space-1);
}

.set-signal__reasons {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.deal-score__parts { width: 100%; max-width: 420px; border-collapse: collapse; font-size: 0.9rem; }
.deal-score__parts th, .deal-score__parts td { padding: var(--space-1) var(--space-2) var(--space-1) 0; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.deal-score__parts th { font-weight: 500; }
.deal-score__part--unknown th, .deal-score__part--unknown td { color: var(--text-muted); }
.deal-score__points { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-score__points small { color: var(--text-muted); }
.deal-score__how { margin: 0; }
.deal-score__how a { display: inline-flex; align-items: center; min-height: 44px; }

/* A key–value list whose rows are <div>s (the phone's .ui-m-kv shape) on the desktop: the signal's body, «Більше про
   ринок» (--grid: two or three columns). */
.sp-kv {
  display: grid;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.sp-kv > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  border-top: 1px solid var(--border);
}

.sp-kv dt {
  color: var(--text-muted);
  font-weight: 400;
}

.sp-kv dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.sp-kv--grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  column-gap: var(--space-6);
}

/* ── The desktop's set page (task 156, _Desktop): the photo beside the head and the price block, then the parts ── */
.sp-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-6);
  align-items: start;
  margin-bottom: 18px;
}

/* One minmax(0, 1fr) cell both ways (task 152's fix of the old header box): the picture's 100 % is the cell's. */
.sp-photo {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-3);
  background: var(--photo-bg);
  box-shadow: var(--shadow-1);
  cursor: zoom-in;
}

.sp-photo img {
  width: 100%;
  height: 100%;
  padding: var(--photo-inset);
  object-fit: contain;
}

.sp-photo:focus-visible:not([data-focus-quiet]) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sp-head {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.sp-back {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  justify-self: start;
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.sp-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.15;
  text-wrap: balance;
}

.sp-number {
  color: var(--text-muted);
  font-weight: 600;
}

.sp-meta,
.sp-mine {
  margin: 0;
  color: var(--text-muted);
}

.sp-status {
  margin: 0;
}

.sp-mine {
  font-size: var(--text-sm);
}

.sp-mine b {
  color: var(--text);
}

/* An order's line and its «Отримав…» (task 174). */
.sp-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.sp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.sp-price {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
}

.sp-price__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
}

.sp-price__value {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sp-price__value span {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: var(--text-lg);
  font-weight: 600;
}

.sp-price__value--empty {
  color: var(--text-muted);
}

.sp-price__where {
  margin: 0;
  color: var(--text-muted);
}

.sp-price__buy {
  margin-left: auto;
}

/* When the best listing was last seen (task 171): the offers' own «бачили», after its shop. */
.sp-price__seen::before {
  content: " · ";
}

/* Which market the price block is about, in the used view alone (task 172): the block stays sealed there. */
.sp-price__market {
  margin: 0;
  font-weight: 600;
}

/* The sources and how fresh each is (tasks 171, 172, Pages/Sets/_SourceAges): the price block's last lines on both pages,
   under a hairline — a line a state, its name first; stale amber, failing red, paused the text's colour, fresh muted. */
.sp-sources {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: var(--space-2) 0 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.sp-sources__group {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
}

.sp-sources__group dt {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  font-weight: 600;
}

.sp-sources__group dt svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sp-sources__group dd {
  margin: 0;
}

.sp-sources__group ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-sources__group--stale {
  color: var(--warn);
}

.sp-sources__group--failing {
  color: var(--down);
}

.sp-sources__group--paused {
  color: var(--text);
}

.sp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sp-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.sp-section-head h2 {
  margin: 0 auto 0 0;
  font-size: var(--text-xl);
}

.sp-count {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 0.8em;
  font-weight: 600;
}

.sp-note {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.sp-fold {
  margin-top: var(--space-4);
}

.sp-fold > summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-sm);
  list-style: none;
  cursor: pointer;
}

.sp-fold > summary::-webkit-details-marker {
  display: none;
}

.sp-fold > summary::after {
  content: "▾" / "";
  margin-left: auto;
  color: var(--text-muted);
}

.sp-fold[open] > summary::after {
  content: "▴" / "";
}

.sp-fold > summary h2,
.sp-fold > summary h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.sp-rating {
  color: var(--text-muted);
}

.sp-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* The figures under the chart are cells of the section's card, not cards in it (task 156, `impeccable detect`). */
.sp-metrics .ui-stat {
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.sp-metric__note {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.sp-line {
  margin: 0 0 var(--space-3);
}

.sp-figures h3,
.sp-instructions h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-lg);
}

.sp-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0 var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-links li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-sm);
}

.sp-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.sp-links small {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .sp-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The set's running auctions (task 144, Pages/Sets/_Auctions): one line each — the listing, new / used, the bid, bidders
   and «станом на», the live time left (12-auctions.css' .auction-time is not loaded here: its pill is repeated), the 👁. */
.set-auctions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.set-auctions li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 90px 220px 120px 44px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.set-auctions li > a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-auctions li > span:not(.auction-time) {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.set-auctions .auction-time {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.set-auctions .auction-time--soon {
  background: var(--warn-bg);
  color: var(--warn);
}

.set-auctions .auction-time--urgent {
  background: var(--down-bg);
  color: var(--down);
}

.set-auctions__status[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .set-auctions li {
    grid-template-columns: minmax(0, 1fr) auto auto 44px;
  }

  .set-auctions li > span:not(.auction-time) {
    display: none;
  }
}

/* «Повідомити про помилку в ціні» (task 148, Pages/Sets/ReportOffer) — the desktop's card; the phone's is the phone components. */
.offer-report { max-width: 560px; }
.offer-report__body { display: grid; gap: var(--space-3); }
.offer-report__body p { margin: 0; }
.offer-report__group { display: grid; gap: var(--space-2); }
.offer-report__foot { justify-content: flex-end; gap: var(--space-2); }
