/* Al-Sumait — Record Strip (.dsm-record) v1.0.0
   Four-number strip below the hero on the front page (101).
   Numbers are the protagonist; icons are quiet marks; sources stay visible. */

.dsm-record {
	--dsrec-rule: var(--wp--preset--color--border-light, #DCE8E3);
	--dsrec-serif: var(--wp--preset--font-family--instrument-serif, "Instrument Serif", Georgia, serif);
}

/* ---- kicker ---- */
.dsm-record .dsm-rec-kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	margin-block-end: clamp(22px, 2.4vw, 34px);
}

.dsm-record .dsm-rec-kicker::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--dsrec-rule);
}

/* ---- grid ---- */
.dsm-record .dsm-rec-grid {
	gap: 0 !important;
}

.dsm-record .dsm-rec-cell {
	padding-inline: clamp(20px, 2.2vw, 32px);
	border-inline-start: 1px solid var(--dsrec-rule);
}

.dsm-record .dsm-rec-cell:first-child {
	border-inline-start: 0;
	padding-inline-start: 0;
}

/* blockGap injects margins that break the vertical rhythm inside a cell (trap 36) */
.dsm-record .dsm-rec-cell > * + * {
	margin-block-start: 0;
}

/* ---- icon: a quiet 22px mark, not a 60px box ---- */
.dsm-record .dsm-rec-cell .wp-block-outermost-icon-block {
	margin-block-end: 16px;
}

.dsm-record .dsm-rec-cell .wp-block-outermost-icon-block .icon-container {
	width: 22px !important;
	color: var(--wp--preset--color--secondary, #2FA084);
}

.dsm-record .dsm-rec-cell .wp-block-outermost-icon-block svg {
	width: 22px;
	height: 22px;
}

/* ---- the number ---- */
.dsm-record .dsm-rec-num {
	font-family: var(--dsrec-serif);
	font-weight: 400;
	/* core emits the preset class with !important, so the clamp must match it */
	font-size: clamp(46px, 5.4vw, 78px) !important;
	line-height: .92;
	letter-spacing: -.01em;
	margin-block-end: 12px;
}

.dsm-record .dsm-rec-num .dsm-rec-sfx {
	color: var(--wp--preset--color--secondary, #2FA084);
}

/* ---- label / description / source ---- */
.dsm-record .dsm-rec-lab {
	font-weight: 600;
	letter-spacing: .11em;
	text-transform: uppercase;
	margin-block-end: 8px;
}

.dsm-record .dsm-rec-desc {
	line-height: 1.55;
	max-width: 24ch;
	margin-block-end: 12px;
}

.dsm-record .dsm-rec-src {
	letter-spacing: .06em;
	padding-block-start: 10px;
	border-block-start: 1px solid var(--dsrec-rule);
	margin-block-end: 0;
}

/* ---- motion rest state: JS reveals; no JS = visible ---- */
.dsm-record.dsm-rec-armed .dsm-rec-cell > *,
.dsm-record.dsm-rec-armed .dsm-rec-cell .wp-block-outermost-icon-block {
	opacity: 0;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
	.dsm-record .dsm-rec-cell:nth-child(3) {
		border-inline-start: 0;
		padding-inline-start: 0;
	}
	.dsm-record .dsm-rec-cell:nth-child(odd) {
		padding-inline-start: 0;
	}
	.dsm-record .dsm-rec-grid {
		row-gap: 38px !important;
	}
}

@media (max-width: 600px) {
	.dsm-record .dsm-rec-grid {
		row-gap: 0 !important;
	}
	.dsm-record .dsm-rec-cell {
		border-inline-start: 0;
		padding-inline: 0;
		padding-block: 0 26px;
		margin-block-end: 26px;
		border-block-end: 1px solid var(--dsrec-rule);
	}
	.dsm-record .dsm-rec-cell:last-child {
		border-block-end: 0;
		padding-block-end: 0;
		margin-block-end: 0;
	}
	.dsm-record .dsm-rec-num {
		font-size: 56px !important;
	}
	.dsm-record .dsm-rec-desc {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dsm-record .dsm-rec-cell > *,
	.dsm-record .dsm-rec-cell .wp-block-outermost-icon-block {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ═══════════════════════════════════════════════════════════════
   1.5.0 · desktop "separating rail" (session 65, direction B)
   ≥782px the four figures sit on ONE baseline with their labels
   beside them; the icon, the description and the per-cell source
   fold away — they stay in the markup and still open on tap ≤781px
   (home.css §3.2). The caveat/sources line was dropped from the three
   front pages at the user's request (session 65). The palette is
   untouched: the band is drawn with hairlines, not with a fill.
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 782px) {

	/* the section reads as a rule between two sections, not a billboard */
	.dsm-record {
		padding-top: 40px !important;
		padding-bottom: 34px !important;
		border-top: 1px solid var(--dsrec-rule);
		border-bottom: 1px solid var(--dsrec-rule);
	}

	.dsm-record .dsm-rec-kicker { margin-block-end: 20px !important; }

	.dsm-record .dsm-rec-cell {
		display: flex;
		align-items: baseline;
		gap: 10px;
		flex-wrap: nowrap;
	}

	.dsm-record .dsm-rec-cell .wp-block-outermost-icon-block,
	.dsm-record .dsm-rec-desc,
	.dsm-record .dsm-rec-src { display: none !important; }

	/* core emits the preset classes with !important, so these must match it */
	.dsm-record .dsm-rec-num {
		font-size: clamp(34px, 3.2vw, 46px) !important;
		line-height: 1;
		letter-spacing: -.01em;
		margin-block-end: 0;
		white-space: nowrap;
	}

	.dsm-record .dsm-rec-lab {
		font-size: clamp(14px, 1.2vw, 17px) !important;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
		line-height: 1.35;
		margin-block-end: 0;
		color: var(--wp--preset--color--secondary, #385353) !important;
	}

}

/* 782–1199px: four one-line pairs do not fit four columns — the English and
   French labels wrap beside the figure. Two columns keep every pair on one
   line (the nth-child border rules in the 900px block already assume 2-up). */
@media (min-width: 782px) and (max-width: 1199px) {
	.dsm-record .dsm-rec-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		row-gap: 26px !important;
	}
	.dsm-record .dsm-rec-cell:nth-child(odd) {
		border-inline-start: 0;
		padding-inline-start: 0;
	}
	.dsm-record .dsm-rec-cell:nth-child(even) {
		border-inline-start: 1px solid var(--dsrec-rule);
	}
}
