/* ==========================================================================
   Campaign wall (CampaignWall.tsx) — the ledger of Meta campaigns on
   /social-media-advertising-management/ and /medspa-os/.

   The section chrome (.ofr, .ofr__eyebrow, .ofr__h2, .ofr__lead) comes from
   offer.css, which both pages already load, so this sheet is only the totals
   row and the ledger. Namespace: .cw__*. Every value resolves to a token.
   ========================================================================== */

/* --- Totals ---------------------------------------------------------------- */
.cw__totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-6) 0 0;
  padding: 0;
}

.cw__totals > div {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.cw__totals dt {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.cw__totals dd {
  margin: 0.35em 0 0;
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step-4);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.cw__totals dd small {
  display: block;
  margin-top: 0.4em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

/* --- Ledger ---------------------------------------------------------------- */
.cw__list {
  list-style: none;
  margin: var(--sp-5) 0 0;
  padding: 0;
  border-top: 1px solid var(--divider);
}

.cw__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8.5rem 8.5rem 6.5rem 7rem 7rem 6rem;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--divider);
  font-variant-numeric: tabular-nums;
}

.cw__row--head {
  /* "Cost per result" wraps at its column width; bottom-aligning the cells
     keeps every label on the same baseline as the rule beneath. */
  align-items: end;
  padding-block: var(--sp-2);
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cw__service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--sp-2);
  align-items: baseline;
  min-width: 0;
}

.cw__name {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--white);
}

.cw__industry {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-light);
  white-space: nowrap;
}

.cw__results,
.cw__cpr,
.cw__spend,
.cw__extra {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  text-align: right;
}

.cw__row b {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-size: var(--step-1);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--white);
}

.cw__row small {
  font-size: var(--step--2);
  color: var(--muted);
}

/* Budget, impressions and reach: there to make the row verifiable, not to be
   read first, so they sit a step smaller and dimmer than the three figures
   that carry the argument. */
.cw__extra b {
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--muted);
}

/* Between phone and desktop the three verifying columns would squeeze the
   figures that matter, so they wait for the phone layout, where every cell
   gets its own line. */
@media (min-width: 761px) and (max-width: 1099px) {
  .cw__row {
    grid-template-columns: minmax(0, 1fr) 8.5rem 8.5rem 6.5rem;
  }

  .cw__extra {
    display: none;
  }
}

.cw__source {
  max-width: 62ch;
  margin: var(--sp-4) 0 0;
  font-family: var(--font-body);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--muted);
}

/* --- Narrow ------------------------------------------------------------------
   Below tablet width the three figures drop under the service on one line,
   so a row is two lines and never a squeezed four-column table. */
@media (max-width: 760px) {
  .cw__totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-2);
  }

  .cw__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--sp-2);
  }

  .cw__row--head {
    display: none;
  }

  .cw__service {
    grid-column: 1 / -1;
  }

  .cw__results,
  .cw__cpr,
  .cw__spend,
  .cw__extra {
    text-align: left;
  }
}
