.tb-stats {
  --tb-glow: #000;
  --tb-accent: #000;
  --tb-gold: #f2b84b;
  /* Blue-to-gold, matching the original highlight colours */
  --heading-gradient-inverse: linear-gradient(90deg,#35acfa,#74a6a6 50%,#d1a55a);
  --tb-sky: #8fd3f2;
  --tb-muted: rgba(255, 255, 255, 0.72);
  --tb-rule: rgba(255, 255, 255, 0.18);
  background: linear-gradient(120deg, #0373bb, #07446f);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

/* ---------- Background layers (unchanged) ---------- */
.tb-stats__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -4;
}
.tb-stats__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #0373bb 0%, #07446f 100%);
  z-index: -3;
}
.tb-stats__glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.tb-stats__glow::before,
.tb-stats__glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.tb-stats__glow::before {
  width: 1040px;
  height: 520px;
  left: -260px;
  top: -220px;
  background: radial-gradient(closest-side, var(--tb-glow), transparent);
  opacity: 0.55;
}
.tb-stats__glow::after {
  width: 840px;
  height: 440px;
  right: -240px;
  bottom: -230px;
  background: radial-gradient(closest-side, var(--tb-accent), transparent);
  opacity: 0.22;
}
.tb-stats--pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
}
.tb-stats__molecule {
  color: var(--tb-sky);
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
}

/* ---------- Layout ---------- */
.tb-stats__inner {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1320px;
  padding: 32px 24px;
}
.tb-stats__list {
  align-items: end; /* keeps all three number rows on one line */
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-stats__item {
  margin: 0;
  padding: 8px 40px;
  position: relative;
}
.tb-stats__item:first-child { padding-left: 0; }
.tb-stats__item + .tb-stats__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 64px;
  transform: translateY(-50%);
  background: var(--tb-rule);
}

/* ---------- Type ---------- */
.tb-stats__heading {
  color: var(--tb-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin: 0 0 10px;
  padding-left: 14px;
  position: relative;
}
/* Gold tick marks the heading, echoing the brand accent once */
.tb-stats__heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  border-radius: 2px;
  background: var(--tb-gold);
}

.tb-stats__row {
  align-items: center;
  display: flex;
  gap: 16px;
}
.tb-stats__value {
  color: #8fc9d9; /* fallback if background-clip: text is unsupported */
  flex: none;
  font-size: 48px;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  padding-bottom: 0.06em; /* stops descenders/edges clipping the gradient */
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tb-stats__value {
    background: var(--heading-gradient-inverse);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.tb-stats__item--total .tb-stats__value {
  font-size: 52px;
}
.tb-stats__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tb-stats__label {
  color: #fff;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
}
.tb-stats__detail {
  color: var(--tb-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* Legacy rich-text fallback */
.tb-stats__name {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Tablet: total on its own row, breakdown below ---------- */
@media (max-width: 1024px) {
  .tb-stats__inner { padding: 28px 24px; }
  .tb-stats__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }
  .tb-stats__item--total {
    grid-column: 1 / -1;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--tb-rule);
  }
  .tb-stats__item { padding: 4px 24px; }
  .tb-stats__item--total + .tb-stats__item { padding-left: 0; }
  .tb-stats__item--total + .tb-stats__item::before { display: none; }
  .tb-stats__molecule { right: -60px; top: -20px; }
}

/* ---------- Mobile: single column ---------- */
@media (max-width: 600px) {
  .tb-stats__list { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .tb-stats__item,
  .tb-stats__item--total + .tb-stats__item { padding: 16px 0; }
  .tb-stats__item--total { padding-top: 0; border-bottom: 0; }
  .tb-stats__item + .tb-stats__item::before,
  .tb-stats__item--total + .tb-stats__item::before {
    display: block;
    top: 0;
    width: 100%;
    height: 1px;
    transform: none;
  }
  .tb-stats__value { font-size: 38px; min-width: 2.2ch; }
  .tb-stats__item--total .tb-stats__value { font-size: 44px; }
  .tb-stats__label { font-size: 16px; }
}