.listing-shell { min-height: 100vh; }

.listing-topbar { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }

.listing-topbar .site-nav { justify-self: end; }
.listing-topbar .search-toggle { justify-self: end; }

.listing-breadcrumb {
  padding: 1.25rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.listing-breadcrumb a { text-decoration: none; }
.listing-breadcrumb a:hover { color: var(--ink); }

.listing-detail {
  min-height: 34rem;
  border-block: 1px solid var(--line);
}

.listing-loading {
  display: grid;
  grid-template-columns: 4.5rem minmax(14rem, 1fr) minmax(15rem, 0.4fr);
  gap: 1rem;
  align-items: start;
  padding: 3rem 0;
}

.listing-loading span {
  display: block;
  min-height: 4.5rem;
  background: var(--surface-subtle);
  animation: evidence-pulse 1.4s ease-in-out infinite alternate;
}

.listing-loading span:nth-child(2) { min-height: 13rem; }
.listing-loading span:nth-child(3) { min-height: 17rem; }
.listing-loading p { grid-column: 2; margin: -9rem 1rem 0; color: var(--muted); font-size: 0.8rem; }

.listing-content {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(17rem, 0.7fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.listing-main { min-width: 0; }

.listing-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.listing-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.75rem;
  height: 4.75rem;
  flex: 0 0 4.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.listing-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.listing-mark.has-icon span { visibility: hidden; }

.listing-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.listing-identity h1 {
  max-width: 20ch;
  margin: 0.35rem 0 0;
  color: var(--ink);
  font-size: 2.4rem;
  font-weight: 880;
  letter-spacing: -0.035em;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.listing-host { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; }

.listing-story {
  max-width: 66ch;
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-wrap: pretty;
}

.listing-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.4rem; }
.listing-actions .secondary-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.listing-actions .secondary-action:hover { border-color: var(--line-strong); color: var(--ink); }
.listing-actions [aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; pointer-events: none; }
.business-profile { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.business-profile h2 { margin: 0 0 1rem; font-size: 1rem; font-weight: 850; }
.business-facts { margin: 0; }
.business-facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .5rem 1rem; padding-block: .65rem; }
.business-facts dt { color: var(--muted); font-size: .85rem; }
.business-facts dd { margin: 0; font-size: .9rem; line-height: 1.6; overflow-wrap: anywhere; }
.business-profile a { color: var(--blue); text-underline-offset: .2em; }
.business-facts a { display: inline-block; padding-block: .3rem; }
.business-source-note { max-width: 68ch; margin: .75rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.business-source-note a { display: inline-block; padding-block: .35rem; }
.business-profile-compact { margin-top: 1rem; padding-top: 0; border-top: 0; }
.business-profile-compact .business-facts > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; padding: 0; }
.business-profile-compact .business-facts dd { font-size: .8rem; }
.business-profile-compact + .evidence-section { margin-top: 1.25rem; }
@media (max-width: 46rem) {
  .business-facts > div { grid-template-columns: 1fr; gap: .2rem; }
  .business-facts a, .business-source-note a { min-height: 2.75rem; display: inline-flex; align-items: center; }
}
.evidence-qualifier { margin: .55rem 0 0; color: var(--muted); font-size: .74rem; }
/* .listing-visit is also the board card's small pill, which sets its own tiny
   type. Here it is a full-size action beside "Share rank" and has to match it. */
.listing-actions .listing-visit { gap: .32rem; min-height: 2.75rem; padding: .65rem .9rem; border-radius: .7rem; background: var(--ink); color: var(--bg); border-color: var(--ink); font: inherit; font-weight: 750; }
.listing-actions .listing-visit:hover { background: var(--ink); color: var(--bg); opacity: .85; }

.evidence-section { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.evidence-heading h2 { margin: 0; font-size: 1rem; font-weight: 850; }
.evidence-heading p { max-width: 60ch; margin: 0.35rem 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.45; }

.evidence-status {
  flex: 0 0 auto;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.2rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 820;
}

.evidence-status.is-verified { border-color: oklch(48% 0.08 160); color: var(--up); }

.evidence-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: .85rem 0 0;
  border-radius: .55rem;
  background: var(--surface-subtle);
  border-block: 1px solid var(--line);
}

.evidence-metrics div { min-width: 0; padding: 1rem 0; }
.evidence-metrics div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.evidence-metrics dt { color: var(--muted); font-size: 0.7rem; font-weight: 720; }
.evidence-metrics dd { margin: 0.15rem 0 0; color: var(--ink); font-size: 1.45rem; font-weight: 880; font-variant-numeric: tabular-nums; }
.evidence-metrics div:last-child dd { color: var(--up); }

.period-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 0.75rem; }
.period-comparison div { display: grid; gap: 0.1rem; min-width: 0; }
.period-comparison div + div { padding-left: 1rem; }
.period-comparison span { color: var(--muted); font-size: 0.66rem; }
.period-comparison strong { color: var(--ink); font-size: 0.78rem; font-variant-numeric: tabular-nums; }

.claim-ticket {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 0.65rem;
  background: var(--accent-soft);
}

.claim-ticket-rule { margin: 0; color: var(--accent-strong); font-size: 0.7rem; font-weight: 820; }
.claim-ticket h2 { margin: 0.45rem 0 0; font-size: 1.65rem; line-height: 1.12; text-wrap: balance; }
.claim-ticket h2 strong { display: block; margin-top: 0.15rem; color: var(--accent-strong); font-size: 2.35rem; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }
.claim-ticket > p:not(.claim-ticket-rule, .claim-disclosure) { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.claim-ticket .primary-action { width: 100%; margin-top: 1rem; text-decoration: none; }
.claim-disclosure { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.66rem; text-align: center; }

.listing-error { max-width: 36rem; padding: 5rem 0; }
.listing-error h1 { margin: 0; font-size: 2rem; }
.listing-error p { margin: 0.6rem 0 1.25rem; color: var(--muted); }
.listing-error .primary-action { text-decoration: none; }
.listing-footer { padding-bottom: 1.5rem; }

@keyframes evidence-pulse {
  from { opacity: 0.55; }
  to { opacity: 0.9; }
}

@media (max-width: 52rem) {
  .listing-content { grid-template-columns: 1fr; gap: 2rem; }
  .claim-ticket { position: static; }
}

@media (max-width: 46rem) {
  .listing-topbar { grid-template-columns: auto minmax(0, 1fr) auto auto auto; padding-block: .35rem .55rem; }
  .listing-topbar .site-nav { display: flex; justify-self: end; gap: .5rem; margin: 0; font-size: .72rem; }
  .listing-topbar .site-nav a { min-height: 2.75rem; padding-inline: .25rem; }
  .listing-breadcrumb a { display: inline-flex; min-height: 2.75rem; align-items: center; }
  .listing-loading { grid-template-columns: 3.75rem minmax(0, 1fr); }
  .listing-loading span:nth-child(3) { display: none; }
  .listing-loading p { grid-column: 2; margin: -9rem 0.75rem 0; }
  .listing-content { padding: 2rem 0; }
  .listing-identity { align-items: flex-start; }
  .listing-mark { width: 3.75rem; height: 3.75rem; flex-basis: 3.75rem; }
  .listing-identity h1 { font-size: 1.8rem; }
  .listing-story { margin-top: 1.5rem; font-size: 1rem; }
  .evidence-heading { display: grid; gap: 0.75rem; }
  .evidence-status { justify-self: start; font-size: 0.75rem; }
  .evidence-metrics { grid-template-columns: 1fr 1fr; }
  .evidence-metrics div:nth-child(2) { border-left: 1px solid var(--line); }
  .evidence-metrics div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .period-comparison { grid-template-columns: 1fr; gap: 0.55rem; }
  .period-comparison div { grid-template-columns: 1fr auto; }
  .period-comparison div + div { padding-left: 0; }
  .listing-labels, .evidence-qualifier, .evidence-heading p, .evidence-status, .evidence-metrics dt, .period-comparison span, .claim-ticket-rule, .claim-disclosure, .listing-record span { font-size: 0.75rem; }
  .claim-ticket h2 strong { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .listing-loading span { animation: none; }
}

.listing-record {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
  margin: 1.1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.listing-record li { display: flex; gap: 0.45rem; align-items: baseline; }
.listing-record span { color: var(--ink-soft); font-size: 0.75rem; }
.listing-record strong { font-size: 0.78rem; font-weight: 700; }

.claim-sticky { display: none; }
@media (max-width: 46rem) {
  .claim-sticky { position: fixed; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); left: .75rem; z-index: 20; display: flex; min-height: 3rem; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 999px; background: var(--accent-fill, var(--accent)); color: #fff; font-size: .9rem; font-weight: 850; text-decoration: none; transition: opacity 160ms var(--ease), transform 160ms var(--ease); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
  .claim-sticky[hidden] { display: none; }
  .claim-sticky.is-yielding { opacity: 0; pointer-events: none; transform: translateY(1rem); transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
  .listing-shell { padding-bottom: 5.5rem; }
}

/* The claim ticket takes the website and the bid right here — the merchant
   arrived at this listing, so the checkout starts on this page instead of
   sending them back to the home form to type the same thing. */
.claim-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin-top: 1rem; }
/* styles.css places .field into the home form's grid (column 2, row 1 on
   desktop; `order` on phones). Here the reading order is the source order:
   website, bid, consent, pay — one column. */
.claim-form .field { grid-column: auto; grid-row: auto; order: 0; }
.claim-form .claim-consent { order: 1; }
.claim-form .primary-action { order: 2; }
.claim-form .field input { min-height: 3rem; font-size: 1rem; }
.claim-money { display: flex; align-items: center; gap: .3rem; min-height: 3rem; padding: 0 .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 850; }
.claim-money:hover { border-color: var(--line-strong); }
.claim-money:focus-within { border-color: var(--accent); }
.claim-money b { flex: 0 0 auto; }
.claim-money input { width: 100%; min-width: 0; min-height: 2.8rem; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 1.05rem; font-weight: 850; font-variant-numeric: tabular-nums; outline: 0; }
.claim-consent { display: flex; align-items: flex-start; gap: .5rem; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.claim-consent input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: .15rem 0 0; accent-color: var(--accent); }
.claim-consent a { color: var(--ink); }
.claim-form .primary-action { width: 100%; margin-top: .2rem; }
.claim-form .primary-action:disabled { opacity: .7; cursor: wait; }
.claim-link[hidden] { display: none; }
.claim-preview { margin: 0; padding: .55rem .7rem; border-radius: .5rem; background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 700; line-height: 1.45; }
.claim-preview strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.claim-preview[hidden] { display: none; }

/* ---- Designer pass ---- */
/* Numbers first; the note on how they are counted is a footnote to them. */
.evidence-note { margin: .6rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
/* A count is not a direction: the click figure sits in ink like the others. */
.evidence-metrics div:last-child dd { color: var(--ink); }
.period-quiet { margin: .75rem 0 0; color: var(--muted); font-size: .74rem; }
/* At phone width the listing page's nav does not fit beside the logo and
   the three utilities; "Board" gives way — the logo and the breadcrumb
   under it both go to the board. */
@media (max-width: 46rem) {
  .listing-topbar .site-nav a[data-copy="board"] { display: none; }
}
/* One rule above the footer, not two: the detail block's bottom border and
   the footer's top border sat 40px apart as a pair of lines. */
.listing-detail { border-bottom: 0; }
/* The breadcrumb had ~90px of air on a phone before anything happened. */
@media (max-width: 46rem) {
  .listing-breadcrumb { padding: .55rem 0 .5rem; }
}
