/* ── Outer container ── */
.wsc-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(20px, 5vw, 48px) clamp(12px, 4vw, 24px);
	font-family: inherit;
	box-sizing: border-box;
}

/* ── Section title ── */
.wsc-title {
	text-align: center;
	font-size: clamp(1.35rem, 4vw, 1.9rem);
	margin: 0 0 clamp(20px, 5vw, 40px);
	line-height: 1.3;
}
.wsc-date {
	font-weight: 400;
	opacity: 0.65;
}

/* ── Responsive grid ── */
.wsc-grid {
	display: grid;
	gap: clamp(12px, 2.5vw, 24px);
}
.wsc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wsc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wsc-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wsc-cols-5 { grid-template-columns: repeat(5, 1fr); }
.wsc-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Grid children default to min-width:auto, so a long word forces the column
   wider than its 1fr share and the last card spills out of the container.
   Allowing them to shrink keeps every card inside the layout. */
.wsc-grid > .wsc-stat-item {
	min-width: 0;
}

/* Tablets and phones: 2 columns (3 squeezes the cards below ~150px) */
@media (max-width: 1024px) {
	.wsc-grid,
	.wsc-cols-2,
	.wsc-cols-3,
	.wsc-cols-4,
	.wsc-cols-5,
	.wsc-cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Small phone: 1 column */
@media (max-width: 400px) {
	.wsc-grid,
	.wsc-cols-2,
	.wsc-cols-3,
	.wsc-cols-4,
	.wsc-cols-5,
	.wsc-cols-6 {
		grid-template-columns: 1fr;
	}
}

/* An odd number of stats leaves a single half-width card on the last row;
   let it run the full width instead of sitting alone next to empty space. */
@media (max-width: 1024px) and (min-width: 401px) {
	.wsc-grid > .wsc-stat-item:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

/* ── Individual stat card ── */
.wsc-stat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: clamp(18px, 4vw, 32px) clamp(10px, 3vw, 20px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	/* ensure cards in same row are equal height */
	align-self: stretch;
}
.wsc-stat-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}
/* Disable hover lift on touch screens */
@media (hover: none) {
	.wsc-stat-item:hover {
		transform: none;
		box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
	}
}

/* ── Number display ── */
.wsc-number {
	display: block;
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 700;
	color: #2563eb;
	line-height: 1;
	margin-bottom: clamp(8px, 2vw, 14px);
	letter-spacing: -0.02em;
	word-break: normal;
	white-space: nowrap;
}

/* ── Label ── */
.wsc-label {
	display: block;
	font-size: clamp(0.7rem, 2vw, 0.85rem);
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/* ─────────────────────────────────────────────────────────────────
 *  Mobile refinements
 * ───────────────────────────────────────────────────────────────── */

/* Fallback sizes for browsers without container query support */
@media (max-width: 1024px) {
	.wsc-container .wsc-number {
		font-size: 1.75rem !important;
	}
}

@media (max-width: 780px) {
	.wsc-title {
		margin-bottom: 20px;
	}

	.wsc-stat-item {
		padding: 18px 12px;
		border-radius: 12px;
	}

	.wsc-container .wsc-number {
		font-size: 1.6rem !important;
		margin-bottom: 8px;
	}

	/* Labels need to stay legible at 11-13px on a phone */
	.wsc-label {
		font-size: clamp(0.75rem, 3.1vw, 0.85rem);
		line-height: 1.4;
		letter-spacing: 0.03em;
		color: #4b5563;
	}

	.wsc-grid {
		gap: 12px;
	}
}

@media (max-width: 520px) {
	/* Keep the "(as of ...)" date from breaking mid-phrase */
	.wsc-date {
		display: block;
	}

	.wsc-title {
		font-size: 1.2rem;
		margin-bottom: 16px;
	}
}

@media (max-width: 400px) {
	.wsc-container .wsc-number {
		font-size: 2rem !important;
	}

	.wsc-stat-item {
		padding: 16px 12px;
	}

	.wsc-label {
		font-size: 0.8125rem;
	}

	.wsc-grid {
		gap: 10px;
	}
}

/* Size the figure against the card, not the viewport: inside the theme's
   narrow content column a "mobile" viewport can still hold 150px cards. */
@supports (container-type: inline-size) {
	@media (max-width: 1024px) {
		.wsc-stat-item {
			container-type: inline-size;
		}

		.wsc-container .wsc-number {
			font-size: clamp(1.5rem, 16cqw, 2.4rem) !important;
		}
	}
}
