/**
 * Phone layout for the Data & Engineering (dx-*) pages, under 768px only.
 *
 * assets/js/global/dx-mobile.js adds main.dx-m and main.dx-m--<page> on the
 * pages that have opted in, marks long card groups as .dx-swipe rows, and
 * adds .dx-m-nav arrows after the longest ones. Every rule is scoped to
 * main.dx-m, so desktop and pages that have not opted in are untouched.
 */

@media (max-width: 767px) {

	/* ---------- swipe rows ---------- */
	main.dx-m .dx-swipe {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: var(--rv-space-12);
		overflow-x: auto;
		overflow-y: hidden; /* vertical swipes pass through to the page */
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		margin-inline: 0;
		padding: 0;
		border: 0;
		background: none;
	}
	main.dx-m .dx-swipe::-webkit-scrollbar { display: none; }
	main.dx-m .dx-swipe:focus-visible {
		outline: 2px solid var(--rv-green);
		outline-offset: 3px;
	}
	/* Off-screen slides never reach the reveal observer, so show them. */
	main.dx-m .dx-swipe > * {
		flex: 0 0 86%;
		min-width: 0;
		margin: 0;
		scroll-snap-align: start;
		opacity: 1;
		transform: none;
	}
	main.dx-m .dx-swipe--full > * { flex-basis: 100%; }

	/* Rows that were plain list rows become cards. */
	main.dx-m .dx-swipe > :is(.dx-dis-row, .dx-ledger-row, .ie-index-row, .ie-pers-row, .ie-obj-row, .dx-pers-card, .dx-record-kpi, .dxlog-row, .dxwho-not-item),
	main.dx-m .dx-hero-strip.dx-swipe > div {
		padding: var(--rv-space-20);
		border: 1px solid var(--rv-hair-dark);
	}
	main.dx-m .dx-ledger.dx-swipe > .dx-ledger-head { display: none; }
	/* Architecture columns differ a lot in height; keep each card its own. */
	main.dx-m :is(.dxarch-cols, .ie-arch-grid, .dxblu-cols, .dxarc--meth).dx-swipe { align-items: flex-start; }

	/* ---------- arrows and count under a full-width slider ---------- */
	main.dx-m .dx-m-nav {
		display: flex;
		align-items: center;
		gap: var(--rv-space-8);
		margin-top: var(--rv-space-12);
		margin-bottom: var(--rv-space-24);
	}
	main.dx-m .dx-m-count {
		margin-right: auto;
		font-family: var(--rv-font-mono, monospace);
		font-size: var(--rv-text-12);
		opacity: 0.7;
	}
	main.dx-m .dx-m-arrow {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
		background: none;
		color: inherit;
		font-size: var(--rv-text-18);
		line-height: 1;
		cursor: pointer;
	}
	main.dx-m .dx-m-arrow:disabled { opacity: 0.3; cursor: default; }
	main.dx-m .dx-m-arrow:focus-visible {
		outline: 2px solid var(--rv-green);
		outline-offset: 3px;
	}

	/* ---------- hero ---------- */
	main.dx-m .dx-hero { padding-top: var(--rv-space-24); }

	/* ---------- stack: the scrolling logo belts repeat the stack cards ---------- */
	main.dx-m .dx-belt { display: none; }
}

/* Second pass: Data normalization and Integration engineering. Phones only. */
@media (max-width: 767px) {

	/* ---------- shared ---------- */
	main.dx-m .dx-sechead { margin-bottom: 0; }

	/* Solid buttons a step smaller. */
	main.dx-m :is(.dx-btn, .dxc-cta, .rv-cta--solid) {
		padding: var(--rv-space-12) var(--rv-space-20);
		font-size: var(--rv-text-14);
	}

	/* ---------- the disconnect ---------- */
	/* The section keeps it as its label (aria-labelledby). */
	main.dx-m #dis-h { display: none; }
	main.dx-m .dx-dis-p { margin: 0; }
	main.dx-m .dx-dis-marker { padding-top: 0; gap: var(--rv-space-12); }
	main.dx-m .dx-dis-motif,
	main.dx-m .dx-dis-motif svg { width: 28px; height: 28px; }
	main.dx-m .dx-dis-marker-line { width: 28px; }

	/* ---------- record standard (stage pipeline) ---------- */
	/* Every stage reads in the list, so nothing changes off-screen when a
	   stage is tapped. The flow diagram repeated the list and only
	   reacted to it; the governance nodes stay. */
	main.dx-m .dxs-step-body { display: block; }
	main.dx-m .dxs-step-btn { color: var(--rv-white); pointer-events: none; }
	main.dx-m .dxs-step::before { display: none; }
	main.dx-m .dxs-steps { gap: var(--rv-space-16); }
	main.dx-m .dxs-step-body { margin-left: 0; }
	main.dx-m .dxs-panel .dxs-flow,
	main.dx-m .dxs-panel-foot,
	main.dx-m .dxs-aux::after { display: none; }
	/* Centred content in a scroller clips the first slide. */
	main.dx-m .dxs-aux.dx-swipe {
		justify-content: flex-start;
		width: 100%;
		flex-direction: row;
	}

	/* ---------- what it costs ---------- */
	main.dx-m .dx-ladder-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
		gap: var(--rv-space-12);
		align-items: center;
		padding-block: var(--rv-space-10);
	}
	main.dx-m .dx-ladder-row .dx-mono { text-align: right; }
	main.dx-m .dx-leaks.dx-swipe { margin-top: var(--rv-space-24); }
	main.dx-m .dx-leaks.dx-swipe > .dx-leak {
		padding: var(--rv-space-20);
		border: 1px solid var(--rv-hair-dark);
	}

	/* ---------- maturity: swipe the cards, arrows replace the rail ---------- */
	main.dx-m .dxm-rail { display: none; }
	main.dx-m .dxm-viewport {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		scroll-padding-inline: 20px;
	}
	main.dx-m .dxm-viewport::-webkit-scrollbar { display: none; }
	main.dx-m .dxm-track,
	main.dx-m .dxm-card { transform: none; }
	main.dx-m .dxm-card { scroll-snap-align: center; }
	main.dx-m .dxm-card-name { font-size: var(--rv-text-28); line-height: 1.1; }
	main.dx-m .dxm-viewport + .dx-m-nav { padding-inline: 20px; }

	/* ---------- the shift: Today / After labels on each card ---------- */
	main.dx-m .dx-m-tag {
		display: block;
		margin-bottom: var(--rv-space-8);
		font-family: var(--rv-font-mono);
		font-size: var(--rv-text-10);
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--rv-mute);
	}
	main.dx-m .dx-ledger-after .dx-m-tag { color: var(--rv-green); }
	main.dx-m .dx-ledger-arrow { display: none; }
	main.dx-m .dx-ledger-row { align-content: start; }

	/* ---------- deliverables ---------- */
	main.dx-m .dxmet-card-out { margin-top: 0; }

	/* ---------- case study ---------- */
	main.dx-m .dx-case-media { display: none; }

	/* ---------- who this is for ---------- */
	main.dx-m :is(.dx-pers-split, .ie-pers-row) li { font-size: var(--rv-text-16); }
	main.dx-m .dx-notfor-row { grid-template-columns: 21px 1fr; }
	main.dx-m .dx-notfor-row .dx-body { font-size: var(--rv-text-16); }
	main.dx-m .ie-notfor li { grid-template-columns: 21px 1fr; }

	/* ---------- track record ---------- */
	main.dx-m .dx-record-hero { font-size: var(--rv-text-44); }
	main.dx-m .dx-record-label { max-width: 34ch; }
	main.dx-m .dx-record-kpis.dx-swipe { margin-top: var(--rv-space-16); padding-top: 0; }

	/* ---------- why us ---------- */
	main.dx-m .dx-diff { padding-block: var(--rv-space-10); gap: var(--rv-space-8); }
	main.dx-m .dx-diffs { margin-top: var(--rv-space-16); }
	main.dx-m .ie-diff { padding: var(--rv-space-14) var(--rv-space-16); gap: var(--rv-space-8); }
	main.dx-m .ie-diffs { margin-top: var(--rv-space-24); }

	/* ---------- close ---------- */
	main.dx-m .dxc-close { padding-block: var(--rv-space-48) var(--rv-space-48); }
	main.dx-m .dxc-label { font-size: var(--rv-text-12); }
	main.dx-m .dxc-title { font-size: var(--rv-text-28); line-height: 1.1; margin-block: var(--rv-space-16); }
	main.dx-m .dxc-lede { font-size: var(--rv-text-16); margin-bottom: var(--rv-space-24); }

	/* ---------- FAQ ---------- */
	main.dx-m .dx-faq-item summary { grid-template-columns: 22px 1fr 16px; }
}

/* Third pass. Phones only. */
@media (max-width: 767px) {

	/* ---------- both pages ---------- */
	/* Off-scale: 330px floor as requested (dx-core sets 360px). */
	main.dx-m .dxm-card { min-height: clamp(330px, 40vw, 470px); }
	main.dx-m .dx-ledger.dx-swipe,
	main.dx-m .dx-belt-rig,
	main.dx-m .dx-stories.dx-swipe,
	main.dx-m .dx-stories { margin-top: 0; }

	/* ---------- Data normalization ---------- */
	main.dx-m .dxmet-feed { margin-top: 0; }
	main.dx-m--data-normalization .dx-case-metric { grid-template-columns: 20px 1fr; }

	/* ---------- Integration engineering ---------- */
	main.dx-m--integration-engineering :is(.ie-index, .ie-pers, .ie-obj, .ie-arch-edge) { margin-top: 0; }
	main.dx-m--integration-engineering .dx-core {
		width: 100%;
		justify-self: stretch;
	}
	main.dx-m--integration-engineering .dx-case-metric { grid-template-columns: 32px 1fr; }
	main.dx-m--integration-engineering :is(.ie-obj-q, .ie-obj-a) { grid-template-columns: 16px minmax(0, 1fr); }
}

/* Fourth pass. Phones only. */
@media (max-width: 767px) {

	/* ---------- every dx page ---------- */
	main.dx-m .dx-dis-h3 { font-size: var(--rv-text-20); }
	main.dx-m .rv-ins-card-media { display: none; }

	/* ---------- BI & dashboards ---------- */
	main.dx-m--business-intelligence .bih-item { grid-template-columns: 20px minmax(0, 1fr); }
	main.dx-m .dxarc-row { padding: 0; border: none; }
	main.dx-m .dxarc-foot { display: none; }
	main.dx-m .dxlog-row {
		padding: var(--rv-space-20) !important;
		border: 1px solid var(--rv-hair-dark) !important;
	}
	main.dx-m :is(.dxblu, .dxlog.dx-swipe, .dxcases.dx-swipe) { margin-top: 0; }

	/* ---------- Financial analytics ---------- */
	main.dx-m .dxexec-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Fifth pass: BI & dashboards. Phones only. */
@media (max-width: 767px) {
	/* A bare 1fr column grew to its widest line and ran past the gutter. */
	main.dx-m--business-intelligence .bih-body { grid-template-columns: minmax(0, 1fr); }
	main.dx-m--business-intelligence .bih-body > * { min-width: 0; }
	main.dx-m--business-intelligence .bih-l { grid-template-columns: minmax(0, 1fr); }
	/* dx-core keeps the typed hero lines on one line; on a phone they wrap. */
	main.dx-m .dx-hero-note-l { white-space: normal; }
	main.dx-m :is(.dx-hero .dx-lede, .pmi-hero2-lede) { font-size: var(--rv-text-16); }
	main.dx-m .rv-ins .rv-ins-card { display: flex; }
	main.dx-m .dxarc-row { display: flex; }
	main.dx-m .dxarc-rail { display: none; }
	main.dx-m .dxarc-main { padding-bottom: 0; }
}

/* Sixth pass: AI & automation, M&A web integration. Phones only. */
@media (max-width: 767px) {

	/* ---------- read more (dx-mobile.js) ---------- */
	main.dx-m .dx-clamp:not(.is-open) {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		overflow: hidden;
	}
	main.dx-m .dx-clamp-more {
		display: block;
		margin: var(--rv-space-8) 0 0;
		padding: 4px 0;
		border: 0;
		background: none;
		color: inherit;
		font-family: var(--rv-font-mono);
		font-size: var(--rv-text-12);
		letter-spacing: 0.1em;
		text-transform: uppercase;
		text-decoration: underline;
		text-underline-offset: 4px;
		cursor: pointer;
	}

	/* ---------- execution ---------- */
	main.dx-m .dxexec-stats > div + div { border-left: 0; }
}

/* Seventh pass: AI & automation, M&A web integration. Phones only. */
@media (max-width: 767px) {

	/* ---------- every dx page ---------- */
	main.dx-m .dx-sechead { padding-bottom: 0; }
	main.dx-m .dxexec { padding-top: var(--rv-space-48); }

	/* The shift: heading flush, cards padded inside their border. */
	main.dx-m .rv-shift .rv-ins-head .rv-h2 { margin-top: 0; }
	main.dx-m .rv-shift .rv-ins-card { padding: var(--rv-space-20); }

	/* Who this is for: arrows (dx-mobile.js) replace the tab list. */
	main.dx-m :is(.dxwho-tabs, .rx-who-tabs, .rx-method-list) { display: none; }
	main.dx-m :is(.dxwho, [data-rx-who], [data-rx-method]) + .dx-m-nav { margin-bottom: var(--rv-space-32); }
	main.dx-m .dx-m-role {
		grid-column: 1 / -1;
		font-size: var(--rv-text-20);
		font-weight: 600;
		line-height: 1.2;
	}

	/* Case studies: tighter band; the arrows in the head step the
	   slides, so the tab rail goes. */
	main.dx-m .rv-cs,
	main.dx-m .rv-root > .rv-cs { padding: var(--rv-space-48) var(--rv-space-20); }
	main.dx-m .rv-cs-rail { display: none; }

	/* ---------- M&A web integration ---------- */
	main.dx-m--ma-web-integration .pmi-hero3 { padding-bottom: var(--rv-space-32); }
	main.dx-m--ma-web-integration #methodology .dxm7-h { padding-top: var(--rv-space-12); }
}

/* Eighth pass. Phones only. */
@media (max-width: 767px) {

	/* ---------- every dx page ---------- */
	/* Off-scale: 32px as requested (tokens step 28 / 34). */
	main.dx-m .dx-hero-h1 { font-size: 32px; }
	main.dx-m .dxwho-panel { padding-top: var(--rv-space-32); }
	/* The case slider moves by transform; dx-mobile.js adds the swipe. */
	main.dx-m .rv-cs-viewport { touch-action: pan-y; }
	main.dx-m .dx-cost { padding-top: var(--rv-space-20); }
}

/* Ninth pass: one solid button on every dx page. Phones only. */
@media (max-width: 767px) {
	/* Matches main.dx-m :is(.dx-btn, .dxc-cta) in the second pass. */
	main.dx-m .rx-btn {
		padding: var(--rv-space-12) var(--rv-space-20);
		font-size: var(--rv-text-14);
		font-weight: 700;
		letter-spacing: -0.01em;
		border: 1px solid transparent; /* dx buttons carry a 1px border */
	}
	/* web-design.css sizes its buttons with !important on .dx.dx-aw.byo. */
	main.dx-m.dx-m--web-design a.dx-btn.dx-btn,
	main.dx-m.dx-m--web-design button.dx-btn.dx-btn {
		padding: var(--rv-space-12) var(--rv-space-20) !important;
		font-size: var(--rv-text-14) !important;
	}
}

/* Tenth pass: Web development, Retainers, Web design. Phones only. */
@media (max-width: 767px) {

	/* ---------- shared ---------- */
	/* Off-scale: 42px as requested (tokens step 34 / 44). */
	main.dx-m .pmi .pmi-cs-feat-metric,
	main.dx-m .pmi-cs-feat-metric { font-size: 42px; }

	/* ---------- Web development ---------- */
	/* Figures: label beside the number, one row each. */
	main.dx-m--web-development .wd-x-figs { margin-top: var(--rv-space-24); }
	main.dx-m--web-development .wd-x-fig {
		flex-direction: row;
		align-items: baseline;
		gap: var(--rv-space-12);
		padding-block: var(--rv-space-10);
	}
	/* A fixed number column keeps the labels in one line-up ("15+" vs "6"). */
	main.dx-m--web-development .wd-x-n { flex: 0 0 3ch; font-size: var(--rv-text-34); }
	main.dx-m--web-development .dx-belt-rig { margin-top: var(--rv-space-16); }
	main.dx-m--web-development .pmi-cs-feat { margin-top: var(--rv-space-16); }
	main.dx-m--web-development .dx-case-metric { grid-template-columns: 48px 1fr; }
	main.dx-m--web-development .dx-diff,
	main.dx-m--web-development .wd-specs .dx-diff { grid-template-columns: 16px 1fr; }

	/* ---------- Retainers for WordPress ---------- */
	/* Off-scale: 30px as requested (tokens step 28 / 34). */
	main.dx-m--wordpress-retainers .rx-hero h1 { font-size: 30px; }
	main.dx-m--wordpress-retainers .rx-hero { padding-bottom: var(--rv-space-32); }
	/* Sections: 48 top, 32 bottom (the nearest token to the dx 36). */
	main.dx-m--wordpress-retainers .rx-sec { padding-block: var(--rv-space-48) var(--rv-space-32); }
	main.dx-m--wordpress-retainers .rx-proof-tile { border: 1px solid var(--rv-hair-dark); }
	main.dx-m--wordpress-retainers .rx-cost-n { font-size: var(--rv-text-44); line-height: 1; }
	main.dx-m--wordpress-retainers .rx-quote blockquote { font-size: var(--rv-text-16); }
	/* Why us: tick beside its line. */
	main.dx-m--wordpress-retainers .rx-diffs li {
		grid-template-columns: 26px minmax(0, 1fr);
		align-items: start;
	}
	main.dx-m--wordpress-retainers .rx-faq-item summary { padding-block: var(--rv-space-16); }

	/* ---------- Web design ---------- */
	/* web-design.css sets .dx.byo h1 and the aw-hero top with !important /
	   three classes; these selectors outrank them. Off-scale 30px as requested. */
	main.dx-m.dx-m--web-design .dx-hero-h1.dx-hero-h1 { font-size: 30px !important; }
	main.dx-m--web-design .dx-sec { padding-block: var(--rv-space-48) var(--rv-space-32); }
	main.dx-m.dx-m--web-design .aw-hero.dx-hero { padding-top: var(--rv-space-48); }
	main.dx-m--web-design .dxexec { padding-bottom: var(--rv-space-32); }
}

/* Eleventh pass: Web design. Phones only. */
@media (max-width: 767px) {
	main.dx-m.dx-m--web-design .dx-hero-h1.dx-hero-h1 { text-align: left !important; }

	/* The gap: no marker column, the copy takes the card. */
	main.dx-m--web-design .dx-dis-marker { display: none; }
	main.dx-m--web-design .dx-dis-row { display: flex; }
	main.dx-m--web-design .dx-dis-row > * { flex: 1 1 auto; min-width: 0; }

	main.dx-m--web-design .rv-del-note { display: none; }
	main.dx-m--web-design .dx-sechead-r { padding-bottom: var(--rv-space-16); }

	/* Architecture: no top padding, edge cards without the connector. */
	main.dx-m--web-design .dx-arch { padding-top: 0; }
	main.dx-m--web-design .dxarch-arrow { display: none; }
	main.dx-m--web-design .dxarch-edge-item { display: flex; }
	main.dx-m--web-design .dxarch-edge-item > .dxarch-card { flex: 1 1 auto; min-width: 0; }

	/* Deliverables: output text without its tag. */
	main.dx-m--web-design .dxmet-card-out { display: flex; }
	main.dx-m--web-design .dxmet-out-tag { display: none; }
}

/* Twelfth pass: Web design, Retainers, Web development. Phones only. */
@media (max-width: 767px) {

	/* ---------- every dx page ---------- */
	/* Read more sits in a grid with a 22px gap; pull it up to 8px under the text. */
	main.dx-m .dxexec-inner > .dx-clamp-more { margin-top: calc(-1 * var(--rv-space-14)); }

	/* ---------- Web design ---------- */
	main.dx-m.dx-m--web-design .dx-hero-h1.dx-hero-h1 { margin-bottom: 0; }
	main.dx-m--web-design :is(#pillars, #maturity, #methodology, #stack, #architecture, #audit, #faq, [aria-labelledby="who-h"]).dx-sec { padding-top: var(--rv-space-24); }
	/* Dark page: the chip border comes from the text colour, not the light-band hairline. */
	main.dx-m--web-design .dxsc-chips li { border-color: color-mix(in srgb, currentColor 40%, transparent); }
	main.dx-m--web-design .rv-cs-metric-num { font-size: var(--rv-text-44); }
	main.dx-m--web-design .dxwho-panel { padding-inline: 0; }
	main.dx-m--web-design .dxwho-not-item { padding: var(--rv-space-20); }
	main.dx-m--web-design .dx-story blockquote { font-size: var(--rv-text-16); }
	/* web-design.css sizes these with !important on .dx.dx-aw.byo. */
	main.dx-m.dx-m--web-design .aw-out-n.aw-out-n { font-size: var(--rv-text-44) !important; line-height: 1; }
	main.dx-m--web-design .dx-obj-card { padding: var(--rv-space-24) var(--rv-space-20); }
	main.dx-m--web-design .dx-obj-card :is(p, h3) { font-size: var(--rv-text-16); }
	main.dx-m--web-design .dx-faq-item summary { padding-inline: 0; }

	/* ---------- Retainers for WordPress ---------- */
	main.dx-m--wordpress-retainers :is(#cost, #shift, #maturity, #stack, #architecture, #execution, #case-studies, #whofor, #why, #book-audit).rx-sec { padding-top: var(--rv-space-24); }
	main.dx-m--wordpress-retainers .rx-method-d { font-size: var(--rv-text-16); }
	/* Was 220px hung 24px above the card; smaller, it moves inside. */
	main.dx-m--wordpress-retainers .rx-quote-mark { font-size: var(--rv-text-44); line-height: 1; top: var(--rv-space-16); right: var(--rv-space-20); }
	/* Off-scale: 15px as requested (tokens step 14 / 16). */
	main.dx-m--wordpress-retainers .rx-quote blockquote { font-size: 15px; }

	/* ---------- Web development ---------- */
	main.dx-m--web-development .wd-hero .wd-hero-copy h1 { font-size: 32px; } /* off-scale, as the other dx heroes */
	main.dx-m--web-development .wd-x-claim-mark { display: none; }
	/* Off-scale: 26px as requested (tokens step 22 / 28). */
	main.dx-m--web-development #cost-h { font-size: 26px; }
}

/* Data & Engineering hub (rv- page). Phones only. */
@media (max-width: 767px) {
	main.dx-m--data-engineering .dx-swipe > :is(.rv-gap-row, .rv-svc-row, .rv-eng-brief, .rv-kpi) {
		padding: var(--rv-space-20);
		border: 1px solid var(--rv-hair-dark);
	}
	main.dx-m--data-engineering .rv-shift .rv-ins-card { padding: var(--rv-space-20); }
	/* Rows differ in height; each slide keeps its own. */
	main.dx-m--data-engineering :is(.rv-svc-list, .rv-eng-briefs, .rv-pillars).dx-swipe { align-items: flex-start; }
	/* As on the Demand Generation hub: the decorative figure goes, numbers a step down. */
	main.dx-m--data-engineering .rv-svc-figbox { display: none; }
	main.dx-m--data-engineering .rv-num { font-size: var(--rv-text-44); }
	main.dx-m--data-engineering .rv-cta--solid { border: 1px solid transparent; } /* 48px like the dx buttons */
}

/* Data & Engineering hub, second pass: the changes made on the other
   pages, carried over to the rv- blocks. Phones only. */
@media (max-width: 767px) {
	main.dx-m--data-engineering {

		/* Hero: higher, smaller title, copy and calls to action only. */
		/* rv-core sets .rv-rh-hero { padding-top: 40px !important }. */
		& section.rv-rh-hero { padding-top: var(--rv-space-16) !important; }
		& .rv-rh-grid { padding-top: 0; }
		& .rv-rh-h1 { font-size: var(--rv-text-28); }
		& .rv-rh-sub { font-size: var(--rv-text-16); }
		& .rv-rh-meta { grid-template-columns: minmax(0, 1fr); }
		/* One column: drop the column indent and dividers. */
		& .rv-rh-meta .rv-rh-mchip {
			padding-inline: 0;
			border-left: 0;
			border-right: 0;
		}
		& .rv-rh-figwrap { display: none; }
		& .rv-rh-left { padding-bottom: var(--rv-space-24); }

		/* Solid buttons as on the dx pages: 12 / 20, 14px, square, 48px. */
		& :is(.rv-rh-cta, .rv-cta--solid) {
			padding: var(--rv-space-12) var(--rv-space-20);
			font-size: var(--rv-text-14);
			border-radius: 0;
		}
		& .rv-rh-cta span { font-size: inherit; }

		/* Logo strip. */
		& .rv-logos { padding: var(--rv-space-12) var(--rv-space-20); }
		& .rv-logos-static { gap: var(--rv-space-8) var(--rv-space-16); }

		/* Sections on the dx phone rhythm: 48 top, 32 bottom, 24 sides. */
		& > section:not(.rv-rh-hero, .rv-logos) {
			padding: var(--rv-space-48) var(--rv-space-24) var(--rv-space-32);
		}
		& .rv-section-head { margin-bottom: var(--rv-space-32); }

		/* As on the Demand Generation hub. */
		& .rv-matx-num { display: none; }
		& .rv-matx-code { flex: none; }
		& .rv-svc-title { font-size: var(--rv-text-22); line-height: 1.2; }
		& .rv-kpi-num .rv-num.rv-num { font-size: var(--rv-text-44); }
		/* Off-scale: 30px, as on the Demand Generation hub. */
		& .rv-kpi-suffix { font-size: 30px; }
		& .rv-case .rv-quote.rv-quote { font-size: var(--rv-text-16); line-height: 1.5; }
		& .rv-close > svg { display: none; }

		/* Close and FAQ, as on the dx pages. */
		/* The page sets it through .rv-root section.rv-close .rv-display.rv-display--sm. */
		& section.rv-close :is(h2, .rv-display.rv-display--sm) { font-size: var(--rv-text-28); line-height: 1.1; }
		& .rv-close p { font-size: var(--rv-text-16); }
		& .rv-faq-item summary { padding-block: var(--rv-space-16); }
	}
}

/* Case studies on every page: the count and arrows move under the slider. */
@media (max-width: 767px) {
	main.dx-m .rv-cs-inner { display: flex; flex-direction: column; }
	main.dx-m .rv-cs-head { display: contents; }
	main.dx-m .rv-cs-head > :first-child { margin-bottom: var(--rv-space-20); }
	main.dx-m .rv-cs-nav { order: 1; margin-top: var(--rv-space-12); }
	/* Count left, arrows right, as under the other sliders. */
	main.dx-m .rv-cs-count { margin-right: auto; }
}

/* Data & Engineering hub, third pass. Phones only. */
@media (max-width: 767px) {
	main.dx-m--data-engineering {
		& .rv-rh-grid { padding-bottom: var(--rv-space-24); }

		/* The gap: the shell's 44px row gap pushed the arrows off the slides. */
		& .rv-gap-shell { row-gap: 0; }
		& .rv-gap-aside { margin-bottom: var(--rv-space-32); }

		& > section.rv-shift.rv-ins { padding-block: var(--rv-space-32); }
		& .rv-ins-card { border: 1px solid var(--rv-hair-dark); }

		& .rv-svc { padding: var(--rv-space-24) 0 0; }

		& .rv-stackx-stage { margin-top: var(--rv-space-24); }
		/* The belt clips to the chip height; one hairline keeps the bottom border. */
		& .rv-stackx-belt { padding-bottom: 1px; }

		& .rv-pillar-body { display: none; }
		& .rv-pillar.is-primary.is-primary li { font-size: var(--rv-text-16); }

		& .rv-delsheet-trigger { grid-template-columns: 40px minmax(0, 1fr) 22px; }
		& .rv-delsheet-code { grid-area: 1 / 1; }
		& .rv-delsheet-title { grid-area: 1 / 2; }
		& .rv-delsheet-mark { grid-area: 1 / 3; justify-self: center; }
		& .rv-delsheet-summary { grid-area: 2 / 2 / auto / -1; }
		/* Top padding kept so the label clears the green rule. */
		& .rv-delsheet-output { background: none; padding: var(--rv-space-12) 0 0; }
		& .rv-del-note { display: none; }

		& .rv-eng-tag { display: none; }
		& .rv-eng-brief-head { display: flex; }

		& > section.rv-testify { padding-top: var(--rv-space-32); }

		& .rv-matx-rail { padding-top: 0; gap: 0; }

		& .rv-folder-tab { display: none; }
		& .rv-folder { margin-top: var(--rv-space-24); }
		& .rv-quote-attr { padding-bottom: var(--rv-space-16); }

		& .rv-out-head { gap: 0; }

		& .rv-faq-item summary { grid-template-columns: 24px minmax(0, 1fr) 24px; font-size: var(--rv-text-16); }
	}
}

/* Data normalization, fourth pass. Phones only. */
@media (max-width: 767px) {
	main.dx-m--data-normalization .dx-dis-marker { display: none; }
	main.dx-m--data-normalization .dx-dis-row { display: flex; }
	main.dx-m--data-normalization .dx-dis-row > * { flex: 1 1 auto; min-width: 0; }

	main.dx-m--data-normalization .dxmet-card-h { font-size: var(--rv-text-18); }

	/* Cases: the accent metric in the same ink as the others, no closing line. */
	main.dx-m--data-normalization .dx-case-metric.is-accent span { color: inherit; }
	main.dx-m--data-normalization .dx-case-foot { display: none; }

	main.dx-m--data-normalization .dx-record-num { font-size: var(--rv-text-34); }

	/* Close: both lines run as one sentence. Inline spans drop the slide-up
	   reveal, so the text is shown at rest. */
	main.dx-m--data-normalization :is(.dxc-mask, .dxc-mask-in) { display: inline; }
	main.dx-m--data-normalization .dxc-mask-in { transform: none; }
}

/* Integration engineering, fourth pass. Phones only. */
@media (max-width: 767px) {
	/* Every dx page: the maturity heading runs as one line. */
	main.dx-m #mat-h br { display: none; }
	/* The break was the only gap between the two halves. */
	main.dx-m #mat-h br + *::before { content: " "; }

	main.dx-m--integration-engineering .dx-hero-strip b { font-size: var(--rv-text-16); }
	/* Off-scale: 15px as requested (tokens step 14 / 16). */
	main.dx-m--integration-engineering .dx-strip-desc { font-size: 15px; }

	main.dx-m--integration-engineering .dx-dis-marker { display: none; }
	main.dx-m--integration-engineering .dx-dis-row { display: flex; }
	main.dx-m--integration-engineering .dx-dis-row > * { flex: 1 1 auto; min-width: 0; }

	/* Off-scale: 24px as requested (tokens step 22 / 28). */
	main.dx-m--integration-engineering #cost-h { font-size: 24px; }

	main.dx-m--integration-engineering .ie-index-num { display: none; }
	main.dx-m--integration-engineering .ie-index-row { display: flex; flex-direction: column; }

	main.dx-m--integration-engineering #stack .dx-mono:not(.dx-eyebrow) { font-size: var(--rv-text-12); }
	main.dx-m--integration-engineering .dx-story blockquote { font-size: var(--rv-text-16); }
}

/* BI & dashboards, sixth pass; the shared rules also cover Financial analytics
   AI & automation, M&A web integration and Web development. Phones only. */
@media (max-width: 767px) {
	main.dx-m--business-intelligence .bih-ref { display: none; }
	main.dx-m--business-intelligence .bih-top { padding: 0; border-bottom: 0; }

	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-dis-marker { display: none; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-dis-row { display: flex; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-dis-row > * { flex: 1 1 auto; min-width: 0; }

	/* The deliverables ledger as a slider, without the numbers. */
	main.dx-m--business-intelligence .bih-num { display: none; }
	main.dx-m--business-intelligence .bih-ledger.dx-swipe { align-items: flex-start; }
	main.dx-m--business-intelligence .bih-ledger.dx-swipe > .bih-item {
		display: block;
		padding: var(--rv-space-20);
		border: 1px solid var(--rv-hair-dark);
	}

	/* Off-scale: 26px as requested (tokens step 22 / 28). */
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) #cost-h { font-size: 26px; margin-top: 0; }

	/* Leaks: no LEAK/01 label, copy takes the card, arrows tight under it. */
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-leak { display: flex; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-leak > span:first-child { display: none; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-leaks + .dx-m-nav { margin-top: 0; }

	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .rv-shift .rv-ins-read { display: none; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .rv-shift .rv-ins-head { margin-bottom: var(--rv-space-24); }
	/* Off-scale: 24px as requested (tokens step 22 / 28). */
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .rv-ins-feature-title.rv-ins-feature-title { font-size: 24px; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .rv-shift .rv-ins-row { gap: 0; }

	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) #met-h { margin-top: var(--rv-space-24); }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) #met-h br { display: none; }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) :is(#del-h, #case-h, #who-h, #tm-h, #why-h, #arch-h, #stk-h, #cs-h) { margin-top: 0; }
	/* The column's 32px row gap sat above the arrows' own 12px. */
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dxarc--meth + .dx-m-nav { margin-top: calc(-1 * var(--rv-space-20)); }

	main.dx-m--business-intelligence .dx-record-num { font-size: var(--rv-text-34); }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-story blockquote { font-size: var(--rv-text-16); }
	main:is(.dx-m--business-intelligence, .dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dx-story-mark { display: none; }

	main:is(.dx-m--financial-analytics, .dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) .dxmet-card-code { display: none; }
}

/* AI & automation, second pass. Phones only. */
@media (max-width: 767px) {
	/* The stack steps as a slider, one card each. */
	main.dx-m--ai-automation .dxs-steps.dx-swipe { align-items: flex-start; }
	main.dx-m--ai-automation .dxs-steps.dx-swipe > .dxs-step {
		padding: var(--rv-space-20);
		border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	}
	/* The layout's 24px row gap sits above the arrows; net 12px, as elsewhere. */
	main.dx-m--ai-automation .dxs-steps + .dx-m-nav { margin-top: calc(-1 * var(--rv-space-12)); }

	main:is(.dx-m--ai-automation, .dx-m--ma-web-integration, .dx-m--web-development) #del-h { font-size: var(--rv-text-28); }

	/* Off-scale: 40px as requested (tokens step 34 / 44). */
	main.dx-m--ma-web-integration .pmi-hero3-h1 { font-size: 40px; }
	main:is(.dx-m--ma-web-integration, .dx-m--web-development) .pmi-hero3-h1 br { display: none; }
	main.dx-m--ai-automation .dxmet-card-h { font-size: var(--rv-text-20); }
}

/* Case study arrows on every dx page: the dx button reset left them
   borderless; same square arrows as the other sliders. */
@media (max-width: 767px) {
	main.dx-m .rv-cs .rv-cs-nav { gap: var(--rv-space-8); }
	main.dx-m .rv-cs .rv-cs-arrow {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
		border-radius: 0;
		font-size: var(--rv-text-18);
	}
}

/* Web development, third pass. Phones only. */
@media (max-width: 767px) {
	/* Section headings ran four and five lines at 30px. Off-scale 26px, as
	   #cost-h on this page (tokens step 22 / 28). */
	/* Two classes: dx-port sets .dx .dx-h2. */
	main.dx-m.dx-m--web-development h2:not(#exec-h) { font-size: 26px; }
	main.dx-m--web-development #exec-h { font-size: var(--rv-text-28); }

	/* The fix ladder as a slider, one card each. */
	main.dx-m--web-development .dx-ladder.dx-swipe { align-items: flex-start; }
	main.dx-m--web-development .dx-ladder.dx-swipe > .dx-ladder-row {
		display: block;
		padding: var(--rv-space-20);
		border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	}
	main.dx-m--web-development .dx-ladder.dx-swipe > .dx-ladder-row::before { display: none; }
	main.dx-m--web-development .dx-ladder.dx-swipe > .dx-ladder-row > * { display: block; }
	main.dx-m--web-development .dx-ladder.dx-swipe > .dx-ladder-row > * + * { margin-top: var(--rv-space-8); }
}

/* Every dx page: the architecture diagram goes, and with it the
   architecture section where the diagram is all it holds. Phones only. */
@media (max-width: 767px) {
	main.dx-m .dx-arch { display: none; }
	main.dx-m section#architecture:has(.dx-arch) { display: none; }

	main.dx-m--data-normalization .dxmet-grid + .dx-m-nav { margin-bottom: 0; }

	/* Leaks: no LEAK/01 label, the copy takes the card. */
	main.dx-m--data-normalization .dx-leak { display: flex; }
	main.dx-m--data-normalization .dx-leak > span:first-child { display: none; }
	main.dx-m--data-normalization .dx-cost { gap: 0; }
}

/* Web design is a dark page, but its hairline tokens are the dark-on-light
   ones, so card edges vanished. On this page they take the light hairline
   at its stronger step. Phones only. */
@media (max-width: 767px) {
	main.dx-m--web-design {
		--dx-hair: var(--rv-hair-strong);
		--dx-dash: var(--rv-hair-strong);
		--dx-dot-soft: var(--rv-hair-strong);
		--rv-hair-dark: var(--rv-hair-strong);
	}
	main.dx-m--web-design .dxm7-list { border-color: var(--rv-hair-strong); }
}

/* Integration engineering and BI & dashboards: the architecture section
   goes. Phones only. */
@media (max-width: 767px) {
	main.dx-m--integration-engineering .ie-arch-sec { display: none; }
	main.dx-m--business-intelligence section#architecture { display: none; }
}

/* BI & dashboards: smaller case card metric and title. Phones only. */
@media (max-width: 767px) {
	main.dx-m--business-intelligence .dxcase-metric strong { font-size: var(--rv-text-22); }
	main.dx-m--business-intelligence .dxcase-title { font-size: var(--rv-text-18); }
}
