/* core/group — kiểu section/card/... (inc/block-styles.php). Chỉ dùng token theme.json. */

/* ---------- Section ---------- */
.wp-block-group:where(.is-style-section, .is-style-section-alt, .is-style-section-dark, .is-style-section-tint, .is-style-section-accent, .is-style-section-hero) {
	padding-block: var(--wp--preset--spacing--80);
}
/* Chỉ 4 loại nền section: trắng (section), band (alt/tint/accent — giữ tên kiểu cũ cho tương thích), tối, gradient hero. */
.wp-block-group:is(.is-style-section-alt, .is-style-section-tint, .is-style-section-accent) { background: var(--wp--preset--color--band); }
.wp-block-group.is-style-section-hero {
	background: var(--wp--preset--gradient--hero);
	padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--80);
}
.wp-block-group.is-style-section-compact {
	padding-block: var(--wp--preset--spacing--50);
	border-block: var(--wp--custom--divider) solid var(--wp--preset--color--line);
}
.wp-block-group.is-style-section-dark {
	background: var(--wp--preset--gradient--dark);
	color: var(--wp--preset--color--surface);
}
.is-style-section-dark :where(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--surface); }
.is-style-section-dark a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--brand-bright); }
.is-style-section-dark .is-style-eyebrow { color: var(--wp--preset--color--brand-bright); }
/* Nút chính trên nền tối: như dark mode của app — primary, chữ trắng (5.17:1). */
.is-style-section-dark .wp-block-button:not(.is-style-outline):not(.is-style-arrow) > .wp-element-button {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--surface);
}
/* Nút viền trên nền tối: bộ chọn đủ mạnh để thắng quy tắc nút viền chung trong base.css. */
.wp-block-group.is-style-section-dark .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--surface); border-color: var(--wp--preset--color--ink-soft); background: transparent; }
.wp-block-group.is-style-section-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink-2); color: var(--wp--preset--color--surface); }
.is-style-section-dark :where(p) { color: var(--wp--preset--color--line); }

/* Hero trang con: H1 cỡ "hero" — nhỏ hơn display (trang chủ) nhưng VẪN lớn hơn H2 mảng (xxl) để giữ thứ bậc. */
.bl-page-hero :where(h1) { font-size: var(--wp--preset--font-size--hero); line-height: var(--wp--custom--line-height--tight); }

/* Hai section nền trắng liền nhau → đường phân chia (chuẩn nhịp section, design-standards §2). */
.wp-block-group.is-style-section + .wp-block-group.is-style-section { border-top: var(--wp--custom--divider) solid var(--wp--preset--color--line); }

/* Đầu section: căn giữa, hẹp, cách nội dung bên dưới. */
.wp-block-group.is-style-section-head {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto !important;
	margin-block-end: var(--wp--preset--spacing--60);
	text-align: center;
}
.wp-block-group.is-style-section-head > * { margin-inline: auto; }

/* Khung hình: nền nhạt bo góc chứa illustration — tạo chiều sâu. */
.wp-block-group.is-style-media-panel {
	background: var(--wp--preset--color--brand-tint);
	border-radius: var(--wp--custom--radius--lg);
	padding: var(--wp--preset--spacing--50);
}
.is-style-section-tint .wp-block-group.is-style-media-panel { background: var(--wp--preset--color--surface); }
/* Bóng hình: SVG tĩnh dùng drop-shadow (theo hình dạng); SVG ĐỘNG dùng box-shadow trên thẻ <svg> đã bo góc theo khung
   (drop-shadow bắt trình duyệt vẽ lại cả hình mỗi khi nội dung đổi → nặng). */
.wp-block-group.is-style-media-panel .bl-illustration .bl-svg:not(:has(.bl-anim)) { filter: drop-shadow(var(--wp--preset--shadow--raised)); }
.wp-block-group.is-style-media-panel .bl-illustration .bl-svg:has(.bl-anim) { box-shadow: var(--wp--preset--shadow--raised); }
/* Hero: hình lớn hơn (custom.illustration.hero); trên điện thoại khung đệm mỏng để hình rộng tối đa. */
.is-style-section-hero .bl-illustration :is(.bl-svg, .bl-illustration__photo) { max-width: var(--wp--custom--illustration--hero); }
@media (max-width: 781px) {
	/* Điện thoại: bỏ khung đệm quanh hình hero → hình rộng hết cột (chữ trong hình không quá nhỏ). */
	.is-style-section-hero .wp-block-group.is-style-media-panel { padding: 0; background: transparent; }
}

/* ---------- Thẻ ---------- */
.wp-block-group:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) {
	--bl-card-pad: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--lg);
	padding: var(--bl-card-pad);
	height: 100%;
}
.wp-block-group:where(.is-style-card, .is-style-card-link) {
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--thin) solid var(--wp--preset--color--line);
	box-shadow: var(--wp--preset--shadow--card);
}
.wp-block-group.is-style-card-plain {
	background: transparent;
	border: var(--wp--custom--border--thin) solid var(--wp--preset--color--line);
}
.wp-block-group.is-style-card-dark {
	background: var(--wp--preset--color--ink-2);
	border: var(--wp--custom--border--thin) solid var(--wp--preset--color--ink-soft);
	color: var(--wp--preset--color--line);
}
.wp-block-group.is-style-card-dark :where(h2, h3, h4) { color: var(--wp--preset--color--surface); }
:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) :where(h3) { font-size: var(--wp--preset--font-size--lg); margin-block: var(--wp--preset--spacing--20) 0; }
:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) :where(p) { font-size: var(--wp--preset--font-size--sm); color: var(--wp--preset--color--ink-soft); }
/* Danh sách thường (không style) trong thẻ: thụt lề gọn, khoảng cách đều. */
:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) .wp-block-list:not([class*="is-style-"]) { padding-inline-start: var(--wp--preset--spacing--30); }
:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) .wp-block-list :where(li + li) { margin-block-start: var(--wp--preset--spacing--10); }
/* Chuẩn cỡ chữ trong thẻ: đoạn văn và danh sách CÙNG cỡ sm (trước: li = md lệch với p = sm). */
:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) :where(li) { font-size: var(--wp--preset--font-size--sm); }
.is-style-card-dark :where(p) { color: var(--wp--preset--color--line); }
.wp-block-group.is-style-card-link { position: relative; transition: transform var(--wp--custom--transition), box-shadow var(--wp--custom--transition); }
.wp-block-group.is-style-card-link:hover { transform: translateY(var(--wp--custom--lift)); box-shadow: var(--wp--preset--shadow--raised); }
.wp-block-group.is-style-card-link :where(h2, h3, h4) a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.wp-block-group.is-style-card-link :where(h2, h3, h4) a { color: inherit; text-decoration: none; }

/* ---------- Chips / mục lục ---------- */
.wp-block-group:where(.is-style-chips, .is-style-toc) {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	justify-content: center;
}
.wp-block-group.is-style-toc :where(p) { margin: 0; flex: none; }
/* Dải mục lục: luôn MỘT hàng ngang, trượt ngang được (ẩn thanh cuộn); vừa khung thì căn giữa.
   Khi tràn, assets/js/toc-scroll.js cho dải tự trôi chậm qua lại; người dùng chạm/trượt → dừng hẳn. */
.wp-block-group.is-style-toc {
	flex-wrap: nowrap;
	justify-content: safe center;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-block: var(--wp--preset--spacing--10);
}
.wp-block-group.is-style-toc::-webkit-scrollbar { display: none; }
.wp-block-group.is-style-toc a { white-space: nowrap; }
/* Khi tràn (lớp do JS gắn): mờ dần hai mép để thấy rõ còn nội dung bên cạnh. */
.wp-block-group.is-style-toc.is-overflowing {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--wp--preset--spacing--50), #000 calc(100% - var(--wp--preset--spacing--50)), transparent);
	mask-image: linear-gradient(to right, transparent, #000 var(--wp--preset--spacing--50), #000 calc(100% - var(--wp--preset--spacing--50)), transparent);
}
/* Chip trong thẻ: luôn căn trái, thẳng hàng với chữ của thẻ. */
:where(.is-style-card, .is-style-card-plain, .is-style-card-dark) .wp-block-group.is-style-chips { justify-content: flex-start; }
.wp-block-group.is-style-toc a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	padding-inline: var(--wp--preset--spacing--40);
	border: var(--wp--custom--border--thin) solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	text-decoration: none;
}
.wp-block-group.is-style-toc a:hover { border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--brand); }

/* ---------- Mảng chức năng có tông màu (class "bl-feature bl-tone-<tên>", inc/tones.php) ---------- */
.bl-feature { position: relative; }
.bl-feature .bl-feature__num {
	margin: 0;
	font-size: var(--wp--custom--number--feature);   /* số mảng 01…: nhỏ hơn H2 một bậc (theme.json custom.number.feature) */
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--bl-tone);
	font-variant-numeric: tabular-nums;
}
.bl-feature .is-style-eyebrow {
	display: inline-flex;
	width: fit-content;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--bl-tone-soft);
	color: var(--bl-tone);
	margin-block-end: 0;
}
.bl-feature .wp-block-group.is-style-media-panel { background: var(--bl-tone-soft); }
.bl-feature .wp-block-list.is-style-check > li::before { background: var(--bl-tone-soft); }
.bl-feature .wp-block-list.is-style-check > li::after { border-color: var(--bl-tone); }
.bl-feature .is-style-chip { border-color: var(--bl-tone); color: var(--bl-tone); background: transparent; }
.bl-feature .wp-block-group.is-style-chips { justify-content: flex-start; }
.bl-feature .bl-icon { color: var(--bl-tone); }
.bl-feature.is-style-section-dark .bl-feature__num,
.bl-feature.is-style-section-dark .is-style-eyebrow,
.bl-feature.is-style-section-dark .is-style-chip { color: var(--bl-tone-light); }
.bl-feature.is-style-section-dark .is-style-eyebrow { background: var(--wp--preset--color--ink-2); }
.bl-feature.is-style-section-dark .is-style-chip { border-color: var(--bl-tone-light); }
.bl-feature.is-style-section-dark .wp-block-group.is-style-media-panel { background: var(--wp--preset--color--ink-2); }
.bl-feature.is-style-section-dark .wp-block-list.is-style-check > li::before { background: var(--wp--preset--color--ink-2); }
.bl-feature.is-style-section-dark .wp-block-list.is-style-check > li::after { border-color: var(--bl-tone-light); }
.bl-feature.is-style-section-dark .wp-block-list li { color: var(--wp--preset--color--line); }
.bl-feature.is-style-section + .bl-feature.is-style-section { border-top: var(--wp--custom--divider) solid var(--wp--preset--color--line); }

@media (max-width: 781px) {
	.wp-block-group.is-style-media-panel { padding: var(--wp--preset--spacing--20); }
	/* Thẻ: lề mỏng hơn trên điện thoại → hình và chữ trong thẻ không bị thu nhỏ quá mức. */
	.wp-block-group:where(.is-style-card, .is-style-card-link, .is-style-card-plain, .is-style-card-dark) { --bl-card-pad: var(--wp--preset--spacing--30); }
	/* Khối chức năng: CHỮ trước, HÌNH sau trên di động (desktop xen kẽ trái/phải). */
	.bl-feature .wp-block-columns > .wp-block-column:has(.is-style-media-panel) { order: 2; }
}

/* Ví dụ luật trên trang chi tiết Dynamic Pricing: nhãn If / Then / Guardrail dạng chip, chữ câu thường. */
.wp-block-group.bl-rule p { margin: 0; display: flex; align-items: baseline; gap: var(--wp--preset--spacing--20); }   /* nhãn cố định bên trái, câu xuống dòng bên phải */
.wp-block-group.bl-rule strong {
	display: inline-block;
	flex: none;
	min-width: 6.5em;
	padding: 2px var(--wp--preset--spacing--20);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--brand-soft);
	color: var(--wp--preset--color--brand);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: .06em;
	text-align: center;
	text-transform: uppercase;
}
.wp-block-group.bl-rule p:first-child strong { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--surface); }

/* Danh mục tính năng: tên tính năng là liên kết tới trang chi tiết (gạch chân mảnh, đậm màu thương hiệu khi rê chuột). */
.bl-catalog-card li a { color: inherit; text-decoration: underline; text-decoration-color: var(--wp--preset--color--brand-bright); text-underline-offset: 3px; }
.bl-catalog-card li a:hover, .bl-catalog-card li a:focus-visible { color: var(--wp--preset--color--brand); text-decoration-color: currentColor; }

/* Nhãn "Coming soon" — tính năng đang phát triển (features.json status: coming_soon). */
.bl-soon {
	display: inline-block;
	padding: 2px var(--wp--preset--spacing--20);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--amber);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}

/* ---------- Trang chủ: 3 bước (home-flow) — số lớn + vạch màu thương hiệu, không thẻ ---------- */
.wp-block-columns.bl-flow > .wp-block-column {
	border-top: var(--wp--custom--border--accent) solid var(--wp--preset--color--brand);
	padding-top: var(--wp--preset--spacing--40);
}
/* Biểu tượng bước + số thứ tự dạng huy hiệu tròn ở góc trên phải. */
.wp-block-group.bl-flow__badge { position: relative; width: fit-content; }
.bl-flow .bl-flow__num {
	position: absolute;
	top: calc(var(--wp--preset--spacing--20) * -1);
	right: calc(var(--wp--preset--spacing--20) * -1);
	margin: 0;
	min-width: 1.75em;
	height: 1.75em;
	display: grid;
	place-items: center;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 0 0 var(--wp--custom--border--accent) var(--wp--preset--color--surface);
}
.bl-flow :where(h3) { font-size: var(--wp--preset--font-size--lg); margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20); }
.bl-flow :where(p:not(.bl-flow__num)) { color: var(--wp--preset--color--ink-soft); margin: 0; }

/* ---------- Trang chủ: đối tượng khách dạng hàng (home-audience) ---------- */
.wp-block-group.bl-rows > .bl-row + .bl-row { border-top: var(--wp--custom--divider) solid var(--wp--preset--color--line); }
.wp-block-group.bl-rows > * { margin: 0; }
.wp-block-group.bl-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--40);
}
.wp-block-group.bl-row > * { margin: 0; }
.bl-row__text > * { margin-block: 0; }
.bl-row__text :where(h3) { font-size: var(--wp--preset--font-size--lg); }
.bl-row__text :where(p) { font-size: var(--wp--preset--font-size--sm); color: var(--wp--preset--color--ink-soft); margin-block-start: var(--wp--preset--spacing--10); }
@media (max-width: 781px) {
	.wp-block-group.bl-row { grid-template-columns: auto minmax(0, 1fr); }
	.wp-block-group.bl-row > .wp-block-buttons { grid-column: 2; }
}

/* Dải "Works with": mỗi hàng nhãn + chip trên một dòng, hai hàng sát nhau. */
.wp-block-group.bl-logo-rows > * + * { margin-block-start: var(--wp--preset--spacing--30); }
.wp-block-group.bl-logo-row { gap: var(--wp--preset--spacing--30); align-items: center; }
.wp-block-group.bl-logo-row > .is-style-note { margin: 0; min-width: 12em; text-align: end; }
@media (max-width: 781px) {
	.wp-block-group.bl-logo-row > .is-style-note { min-width: 0; text-align: center; flex-basis: 100%; }
}
@media (max-width: 781px) {
	/* Điện thoại: 3 bước gọn (số trái, chữ phải); hàng khách căn theo dòng đầu. */
	.wp-block-columns.bl-flow > .wp-block-column {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: var(--wp--preset--spacing--30);
		padding-top: var(--wp--preset--spacing--30);
	}
	.wp-block-columns.bl-flow > .wp-block-column > * { margin: 0; }
	.bl-flow .bl-flow__badge { grid-row: span 2; align-self: start; margin-top: var(--wp--preset--spacing--10) !important; }
	.bl-flow :where(h3) { margin: 0; font-size: var(--wp--preset--font-size--lg); }
	.wp-block-group.bl-row { align-items: start; gap: var(--wp--preset--spacing--30); }
}

/* Viên tên tính năng có icon (.bl-tag) trong mảng tính năng: viên = nhóm flex, icon + chữ cùng màu tông. */
.wp-block-group.bl-tag {
	display: inline-flex;
	width: fit-content;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30) var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--bl-tone-soft, var(--wp--preset--color--brand-soft));   /* ngoài mảng tính năng: tông thương hiệu */
	color: var(--bl-tone, var(--wp--preset--color--brand));
}
.wp-block-group.bl-tag > * { margin: 0; }
.bl-feature .bl-tag .is-style-eyebrow { padding: 0; background: none; color: inherit; }   /* giữ chiều cao dòng của nhãn → viên cao bằng bản không icon */
.bl-tag .bl-icon { color: inherit; }
.bl-feature.is-style-section-dark .wp-block-group.bl-tag { background: var(--wp--preset--color--ink-2); color: var(--bl-tone-light); }

@property --bl-spot-x { syntax: '<percentage>'; inherits: true; initial-value: 22%; }
@property --bl-spot-y { syntax: '<percentage>'; inherits: true; initial-value: 24%; }
/* Khung hình mảng tính năng trang chủ — lưới chấm 2 lớp (người dùng 10/11: chấm thành lưới, không kẻ đường, không viền).
   Nền: tông nhạt + 2 quầng màu tông ở góc chéo + quầng trắng sau cửa sổ.
   ::before = chấm nền (tông 28%) phủ đều, mờ ra mép. ::after = chấm SÁNG (tông 85%, to hơn) chỉ hiện trong vùng
   "đèn chiếu" (mask tròn) — rê chuột: đèn trượt sang góc đối diện (transition, không animation liên tục → nhẹ).
   Bóng cửa sổ demo nhuốm màu tông. Bước lưới --bl-grid; vị trí đèn --bl-spot-x/y. */
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel {
	--bl-grid: var(--wp--preset--spacing--40);
	--bl-spot-x: 22%;
	--bl-spot-y: 24%;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border: 0;
	background:
		radial-gradient(ellipse 45% 40% at 50% 50%, color-mix(in srgb, var(--wp--preset--color--surface) 75%, transparent), transparent 70%),
		radial-gradient(ellipse 55% 60% at 0% 0%, color-mix(in srgb, var(--bl-tone) 16%, transparent), transparent 70%),
		radial-gradient(ellipse 55% 60% at 100% 100%, color-mix(in srgb, var(--bl-tone) 12%, transparent), transparent 70%),
		var(--bl-tone-soft);
}
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel::before,
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel::before {
	background: radial-gradient(circle, color-mix(in srgb, var(--bl-tone) 28%, transparent) 1.25px, transparent 1.75px) 0 0 / var(--bl-grid) var(--bl-grid);
	-webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 50%, #000 50%, transparent 100%);
	mask-image: radial-gradient(ellipse 90% 85% at 50% 50%, #000 50%, transparent 100%);
}
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel::after {
	background: radial-gradient(circle, color-mix(in srgb, var(--bl-tone) 85%, transparent) 1.75px, transparent 2.25px) 0 0 / var(--bl-grid) var(--bl-grid);
	-webkit-mask-image: radial-gradient(circle at var(--bl-spot-x) var(--bl-spot-y), #000 0, transparent 38%);
	mask-image: radial-gradient(circle at var(--bl-spot-x) var(--bl-spot-y), #000 0, transparent 38%);
}
/* Đèn chuyển động: transition đặt trên khung (::after thừa hưởng giá trị đang chuyển). */
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel { transition: --bl-spot-x 1.2s ease, --bl-spot-y 1.2s ease; }
/* Mảng xen kẽ (hình bên trái — class is-flip từ build-patterns): đèn ở góc đối diện cho cân. */
.bl-feature.is-flip .wp-block-group.is-style-media-panel { --bl-spot-x: 78%; --bl-spot-y: 76%; }
/* Rê chuột: đèn trượt sang góc đối diện (biến đăng ký @property → chuyển động mượt). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel:hover { --bl-spot-x: 78%; --bl-spot-y: 76%; }
	.bl-feature.is-flip .wp-block-group.is-style-media-panel:hover { --bl-spot-x: 22%; --bl-spot-y: 24%; }
}
/* Bóng cửa sổ demo nhuốm màu tông. */
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel .bl-illustration .bl-svg:has(.bl-anim) {
	box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--bl-tone) 35%, transparent), 0 2px 6px color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent);
}
:is(.bl-feature, .bl-page-hero) .wp-block-group.is-style-media-panel .bl-illustration .bl-svg:not(:has(.bl-anim)) {
	filter: drop-shadow(0 14px 22px color-mix(in srgb, var(--bl-tone) 28%, transparent));
}

/* Mảng tính năng trang chủ xen kẽ nền "band" (#eef2f8, đậm hơn surface-alt) — tách rõ với mảng trắng bên cạnh. */
.wp-block-group.bl-home-feature.is-band { background: var(--wp--preset--color--band); }
/* Dải band đã tự phân cách bằng màu → bỏ đường kẻ giữa hai section liền nhau ở mép dải. */
.wp-block-group.is-style-section + .wp-block-group.bl-home-feature.is-band,
.wp-block-group.bl-home-feature.is-band + .wp-block-group.is-style-section { border-top: 0; }
/* Viên tên tính năng trên nền band: nền tông nhạt của vài tông (vd primary = brand-soft) gần trùng màu band → viên chìm.
   Trên band dùng nền trắng cho MỌI viên (đồng bộ, luôn nổi). */
.bl-home-feature.is-band .wp-block-group.bl-tag { background: var(--wp--preset--color--surface); }

/* Dòng "Works with" trong cột chữ (features.json works_with): MỘT HÀNG — nhãn + chip logo không xuống dòng;
   tràn → vuốt/cuộn ngang (ẩn thanh cuộn); mép phải mờ dần khi còn chip bị khuất (scroll-driven, trình duyệt hỗ trợ). */
.wp-block-group.bl-works-with {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-block-start: var(--wp--preset--spacing--40);
	min-width: 0;
}
.wp-block-group.bl-works-with > * { margin: 0; }
.bl-works-with .bl-works-with__label { flex: none; white-space: nowrap; font-size: var(--wp--preset--font-size--xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--ink-soft); }
.bl-works-with .wp-block-group.is-style-chips {
	flex: 1 1 auto;
	min-width: 0;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: var(--wp--preset--spacing--20);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-block: 2px;   /* chừa viền chip khỏi bị cắt */
}
.bl-works-with .wp-block-group.is-style-chips::-webkit-scrollbar { display: none; }
.bl-works-with .is-style-chip { flex: none; white-space: nowrap; font-size: var(--wp--preset--font-size--xs); }
@property --bl-ww-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll(inline)) {
	.bl-works-with .wp-block-group.is-style-chips {
		/* Gốc 0 = không mờ (vừa một hàng → dòng thời gian cuộn không hoạt động → không mờ oan chip cuối). */
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--bl-ww-fade)), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - var(--bl-ww-fade)), transparent);
		animation: bl-ww-fade linear both;
		animation-timeline: scroll(self inline);
	}
	@keyframes bl-ww-fade { from { --bl-ww-fade: var(--wp--preset--spacing--50); } to { --bl-ww-fade: 0px; } }
}

/* Mảng tính năng (.bl-feature — trang chủ 01–05, trang Features, trang giải pháp) trên ĐIỆN THOẠI:
   số → viên tên → H2 → ẢNH → mô tả, gạch đầu dòng, Works with, liên kết (người dùng 10/11: ảnh không bị đẩy xuống quá sâu).
   Cột chữ display: contents → các phần tử của nó và cột ảnh cùng là con của hàng cột → sắp bằng order. Desktop không đổi. */
@media (max-width: 781px) {
	.bl-feature .wp-block-columns { display: flex; flex-direction: column; gap: 0; }
	.bl-feature .wp-block-columns > *, .bl-feature .wp-block-columns > .wp-block-column:not(:has(.is-style-media-panel)) > * { flex-shrink: 0; }
	.bl-feature .wp-block-columns > .wp-block-column:not(:has(.is-style-media-panel)) { display: contents; }
	.bl-feature .wp-block-columns > .wp-block-column:not(:has(.is-style-media-panel)) > * { order: 3; }
	.bl-feature .wp-block-columns > .wp-block-column:not(:has(.is-style-media-panel)) > :is(.bl-feature__num, .is-style-eyebrow, .bl-tag, h2) { order: 1; }
	.bl-feature .wp-block-columns > .wp-block-column:has(.is-style-media-panel) { order: 2; flex: none !important; width: 100%; align-self: stretch; margin-block: var(--wp--preset--spacing--40); }
}

/* Sân khấu ảnh (lưới chấm + quầng + bóng màu tông) dùng chung: mảng tính năng (trang chủ, Features, giải pháp) + hero trang tính năng.
   Hero trang tính năng chưa có tông → mặc định tông thương hiệu. Trên điện thoại hero giữ khung (ảnh vẫn "là một ảnh"). */
.bl-page-hero { --bl-tone: var(--wp--preset--color--brand); --bl-tone-soft: var(--wp--preset--color--brand-soft); }
@media (max-width: 781px) {
	.is-style-section-hero.bl-page-hero .wp-block-group.is-style-media-panel { padding: var(--wp--preset--spacing--30); }
}

/* Hero (trang chủ + trang tính năng) trên ĐIỆN THOẠI: nhãn/breadcrumb → H1 → ẢNH → câu giới thiệu, Works with, nút, ghi chú.
   Cột chữ display: contents → sắp bằng order (như mảng tính năng). Desktop không đổi. */
@media (max-width: 781px) {
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) { display: flex; flex-direction: column; gap: 0; }
	/* Xếp dọc: không cho phần tử co (flex-shrink) — nếu co, hình tràn khỏi cột và đè lên chữ bên dưới. */
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > *,
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > .wp-block-column:not(:has(.is-style-media-panel)) > * { flex-shrink: 0; }
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > .wp-block-column:not(:has(.is-style-media-panel)) { display: contents; }
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > .wp-block-column:not(:has(.is-style-media-panel)) > * { order: 3; }
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > .wp-block-column:not(:has(.is-style-media-panel)) > :is(.wp-block-blackaha-lens-breadcrumb, .bl-breadcrumb, .is-style-eyebrow, h1, p:has(> .bl-soon)) { order: 1; }
	/* flex-basis !important: cột ảnh có flex-basis % viết trong HTML (tỷ lệ cột desktop) — khi xếp dọc nó bị tính theo CHIỀU CAO → hình tràn khỏi cột. */
	.is-style-section-hero .wp-block-columns:has(.is-style-media-panel) > .wp-block-column:has(.is-style-media-panel) { order: 2; flex: none !important; width: 100%; align-self: stretch; margin-block: var(--wp--preset--spacing--40); }
}
/* Xếp dọc trên điện thoại (cột chữ display: contents): mọi phần tử bị giới hạn trong bề rộng hàng — nếu không, hàng
   chip "Works with" (không xuống dòng) giãn theo nội dung và kéo cả trang phình ngang. */
@media (max-width: 781px) {
	:is(.bl-feature, .is-style-section-hero) .wp-block-columns:has(.is-style-media-panel) { width: 100%; min-width: 0; max-width: 100%; }
	:is(.bl-feature, .is-style-section-hero) .wp-block-columns:has(.is-style-media-panel) > *,
	:is(.bl-feature, .is-style-section-hero) .wp-block-columns:has(.is-style-media-panel) > .wp-block-column > * { min-width: 0; max-width: 100%; }
}

/* Nền xen kẽ tự động (tools/build-pages.php bl_bp_alternate): section trùng nền với section trước được đổi nền. */
.wp-block-group.alignfull.bl-bg-band { background: var(--wp--preset--color--band); }
.wp-block-group.alignfull.bl-bg-plain { background: var(--wp--preset--color--surface); }

/* ---------- Ô lưới tối có liên kết (is-style-card-dark + bl-card-linked; lưới 6 ô trang chủ) — tinh thần Apple ----------
   Cả ô là MỘT vùng bấm (liên kết tiêu đề kéo phủ ô), chữ không gạch chân; viền mảnh trong suốt, ánh sáng nhẹ đầu ô,
   nút mũi tên tròn góc dưới; rê chuột: ô sáng viền + nhấc nhẹ, mũi tên đổ màu thương hiệu. Số đo: theme.json custom.tile. */
.wp-block-group.is-style-card-dark.bl-card-linked {
	position: relative;
	gap: var(--wp--preset--spacing--20);
	padding-bottom: calc(var(--bl-card-pad) + var(--wp--custom--tile--arrow));
	border-radius: var(--wp--custom--tile--radius);
	border-color: color-mix(in srgb, var(--wp--preset--color--surface) var(--wp--custom--tile--edge), transparent);
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--surface) var(--wp--custom--tile--sheen), transparent), transparent 60%),
		var(--wp--preset--color--ink-2);
	transition: transform var(--wp--custom--transition), border-color var(--wp--custom--transition);
}
.wp-block-group.is-style-card-dark.bl-card-linked :where(h3) {
	margin-block: var(--wp--preset--spacing--30) 0;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.15;
}
.wp-block-group.is-style-card-dark.bl-card-linked :where(h3) a { color: var(--wp--preset--color--surface); text-decoration: none; }
.wp-block-group.is-style-card-dark.bl-card-linked :where(h3) a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wp-block-group.is-style-card-dark.bl-card-linked :where(h3) a:focus-visible { outline: none; }
.wp-block-group.is-style-card-dark.bl-card-linked:has(a:focus-visible) { outline: var(--wp--custom--focus-ring) solid var(--wp--preset--color--brand-bright); outline-offset: var(--wp--custom--focus-offset); }
.wp-block-group.is-style-card-dark.bl-card-linked p { margin: 0; font-size: var(--wp--preset--font-size--md); line-height: 1.5; color: var(--wp--preset--color--line); opacity: .8; }
/* Biểu tượng: không ô nền, to và sáng màu thương hiệu. */
.wp-block-group.is-style-card-dark.bl-card-linked .bl-icon { --bl-icon-size: var(--wp--custom--icon--xl) !important; background: none !important; padding: 0 !important; }
/* Nút mũi tên tròn góc dưới phải: ::after = vòng tròn, ::before = mũi tên (biểu tượng theme, tô màu bằng mask). */
.wp-block-group.is-style-card-dark.bl-card-linked::before,
.wp-block-group.is-style-card-dark.bl-card-linked::after {
	content: "";
	position: absolute;
	right: var(--bl-card-pad);
	bottom: var(--bl-card-pad);
	width: var(--wp--custom--tile--arrow);
	height: var(--wp--custom--tile--arrow);
	transition: background-color var(--wp--custom--transition), transform var(--wp--custom--transition);
}
.wp-block-group.is-style-card-dark.bl-card-linked::after {
	border-radius: var(--wp--custom--radius--pill);
	background-color: color-mix(in srgb, var(--wp--preset--color--surface) var(--wp--custom--tile--edge), transparent);
}
.wp-block-group.is-style-card-dark.bl-card-linked::before {
	z-index: 1;
	background-color: var(--wp--preset--color--surface);
	-webkit-mask: var(--bl-arrow-icon) center / 45% no-repeat;
	mask: var(--bl-arrow-icon) center / 45% no-repeat;
}
.wp-block-group.is-style-card-dark.bl-card-linked:hover {
	transform: translateY(var(--wp--custom--lift));
	border-color: color-mix(in srgb, var(--wp--preset--color--surface) var(--wp--custom--tile--edge-hover), transparent);
}
.wp-block-group.is-style-card-dark.bl-card-linked:hover::after { background-color: var(--wp--preset--color--brand); }
.wp-block-group.is-style-card-dark.bl-card-linked:hover::before { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-card-dark.bl-card-linked, .wp-block-group.is-style-card-dark.bl-card-linked::before, .wp-block-group.is-style-card-dark.bl-card-linked::after { transition: none; }
	.wp-block-group.is-style-card-dark.bl-card-linked:hover, .wp-block-group.is-style-card-dark.bl-card-linked:hover::before { transform: none; }
}
/* Dòng "Coming soon" dưới lưới (nền tối): nhãn viền mảnh thay vì khối màu; liên kết không gạch chân, có "›". */
.is-style-section-dark .bl-bento__soon { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--wp--preset--spacing--20); color: var(--wp--preset--color--line); }
.is-style-section-dark .bl-bento__soon .bl-soon { background: transparent; border: var(--wp--custom--border--thin) solid currentColor; color: var(--wp--preset--color--amber); }
.is-style-section-dark .bl-bento__soon a { color: var(--wp--preset--color--brand-bright); text-decoration: none; }
.is-style-section-dark .bl-bento__soon a::after { content: "\203A"; margin-inline-start: .3em; }
.is-style-section-dark .bl-bento__soon a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Điện thoại: mũi tên lên góc TRÊN (ngang biểu tượng) → ô thấp hơn, danh sách dọc gọn. */
@media (max-width: 781px) {
	.wp-block-group.is-style-card-dark.bl-card-linked { padding-bottom: var(--bl-card-pad); }
	.wp-block-group.is-style-card-dark.bl-card-linked::before,
	.wp-block-group.is-style-card-dark.bl-card-linked::after { top: var(--bl-card-pad); bottom: auto; }
	.wp-block-group.is-style-card-dark.bl-card-linked .bl-icon { --bl-icon-size: var(--wp--custom--icon--lg) !important; }
	.wp-block-group.is-style-card-dark.bl-card-linked :where(h3) { margin-block-start: var(--wp--preset--spacing--20); }
}
