/*
 * AV-Security — «Услуги», section 04 «Комплексный подход»: bento layout.
 * ----------------------------------------------------------------------------
 * Loaded on /uslugi/ in 'bento' mode (inc/services.php), after services-complex.css and
 * services-complex-25d.css; everything is scoped to .av-cx--bento
 * (patterns/services-system-bento.php). Markers, points, pins, labels and
 * the tooltip keep their 2.5D styles; this file sets the grid, the photo
 * card, the tools, the «Журнал событий» disclosure and the system cards.
 *
 * Mock-up: av-security-complex-bento-reference.png (1536 × 1024; sizes
 * below are the mock-up's at 1440 px, × 0.9375).
 *   ≥1200px  copy + stages + CTAs | photo (1035 : 571) · four cards
 *   900–1199 intro | stages · CTAs · photo · log · cards 2 × 2
 *   600–899  copy · CTAs · photo · log · cards 2 × 2
 *   <600     the same, photo full bleed, cards in one column
 */

.av-cx--bento {
	--bx-pad: max(var(--wp--preset--spacing--50), 2.95vw);
	--bx-gap: 1rem;
	/* Corners on the homepage's scale: 8px large containers (the
	   calculator), 4px cards and panels (service / object tiles), 2px small
	   inner parts (buttons). Round things stay round. --av-cx-r: the 2.5D
	   tooltip, labels and panel, inside this section only. */
	--bx-r: 8px;
	--bx-r-card: 4px;
	--bx-r-sm: 2px;
	--av-cx-r: 4px;
	--bx-line: rgba(150, 175, 215, 0.2);
	--bx-glass: rgba(8, 20, 36, 0.86);
	--bx-text: #e6eefb;
	--bx-text-2: rgba(203, 216, 232, 0.82);
}

.av-services-page .av-section.av-cx--bento {
	--av-section-pt: 2.5rem;
	--av-section-pb: 2.5rem;
}

/* ------------------------------------------------------------ Grid */

.av-cx--bento .av-cx__layout {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"copy"
		"actions"
		"stage"
		"cards"
		"note";
	max-width: 93.75rem;
	margin-inline: auto;
	padding-inline: var(--bx-pad);
}

.av-cx--bento .av-cx__copy {
	grid-area: copy;
	max-width: none;
	min-height: 0;
}

.av-cx--bento .av-svc-system__action {
	grid-area: actions;
}

.av-cx--bento .av-cx__stage {
	grid-area: stage;
	position: relative;
	min-width: 0;
	/* Not the block gap of the group's flow layout: the grid spaces it. */
	margin: 0;
}

.av-cx--bento .av-cx__cards {
	grid-area: cards;
}

.av-cx--bento .av-cx__note {
	grid-area: note;
}

/* ------------------------------------------------------------ Copy */

.av-services-page .av-cx--bento .av-svc-lead {
	max-width: 30rem;
	font-size: 0.9375rem;
	line-height: 1.55;
}

.av-cx--bento .av-cx__steps {
	gap: 1rem;
	margin-top: 1.5rem;
}

.av-cx--bento .av-cx__step + .av-cx__step::before {
	display: none;
}

.av-services-page .av-cx--bento .av-cx__step-btn {
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 1.1rem;
	padding: 0.15rem 0;
	border-radius: var(--bx-r-card);
}

.av-cx--bento .av-cx__step-num {
	width: 3rem;
	height: 3rem;
	border-color: rgba(150, 175, 215, 0.45);
	background-color: rgba(10, 26, 43, 0.6);
}

.av-services-page .av-cx--bento .av-cx__step-title {
	font-size: 0.9375rem;
}

.av-services-page .av-cx--bento .av-cx__step-text {
	font-size: 0.875rem;
}

.av-services-page .av-cx--bento .av-cx__step-btn:hover .av-cx__step-title {
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.35);
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------ CTAs */

.av-services-page .av-cx--bento .av-svc-system__action {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	margin: 1.5rem 0 0;
}

/* ------------------------------------------------------------ Photo card */

.av-cx--bento .av-cx__scene,
.av-cx--bento[data-av-cx] .av-cx__scene {
	position: relative;
	inset: auto;
	box-sizing: border-box;
	width: auto;
	height: var(--av-cx-h);
	margin: 1.5rem 0 0;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-r);
	overflow: hidden;
	background: #07111f;
	box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.8);
}

/* The photo is framed: no fade into the band. */
.av-cx--bento .av-cx__fade {
	display: none;
}

.av-cx--bento .av-cx__scene:fullscreen {
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
}

/* Caption: what the photo is and that the points open (until one is used). */
.av-cx--bento .av-cx__caption {
	position: absolute;
	top: 0.875rem;
	left: 0.875rem;
	z-index: 4;
	max-width: calc(100% - 6rem);
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-r-card);
	background-color: var(--bx-glass);
	color: var(--bx-text);
	font-size: 0.8125rem;
	line-height: 1.35;
	pointer-events: none;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.av-cx--bento .av-cx__caption[hidden] {
	display: none;
}

/* Zoom tools: a column top right (+ − reset), full screen apart. */
.av-services-page .av-cx--bento .av-cx__tools {
	top: 0.875rem;
	right: 0.875rem;
	bottom: auto;
	left: auto;
	flex-direction: column;
	gap: 0.875rem;
}

.av-cx--bento .av-cx__tools[hidden] {
	display: none;
}

.av-cx--bento .av-cx__tools-group {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-r-card);
	background-color: var(--bx-glass);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.av-services-page .av-cx--bento .av-cx__tool {
	width: 2.75rem;
	height: 2.625rem;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-r-card);
	background-color: var(--bx-glass);
}

.av-services-page .av-cx--bento .av-cx__tools-group .av-cx__tool {
	border: 0;
	border-radius: 0;
	background-color: transparent;
}

.av-services-page .av-cx--bento .av-cx__tools-group .av-cx__tool + .av-cx__tool {
	border-top: 1px solid var(--bx-line);
}

.av-services-page .av-cx--bento .av-cx__tool:hover {
	background-color: rgba(26, 95, 180, 0.35);
}

.av-services-page .av-cx--bento .av-cx__tool--reset {
	/* The theme lays this one out as an inline-flex icon + label row; here
	   the label is hidden, so it is centred like + and −. */
	display: grid;
	place-items: center;
	width: 2.75rem;
	padding: 0;
}

.av-cx--bento .av-cx__tool--reset span {
	display: none;
}

.av-cx--bento .av-cx__tool[hidden] {
	display: none;
}

/* System pins: larger, with a glowing ring in the system colour (mock-up). */
.av-services-page .av-cx--bento .av-cx__pin {
	width: 3rem;
	height: 3rem;
	margin: -1.5rem 0 0 -1.5rem;
	border-width: 2px;
	background-color: rgba(8, 20, 36, 0.88);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--av-cx-a) 22%, transparent), 0 0 22px color-mix(in srgb, var(--av-cx-a) 45%, transparent);
}

.av-services-page .av-cx--bento .av-cx__pin[aria-pressed="true"] {
	background-color: var(--av-cx-a);
	color: #07111f;
}

.av-cx--bento .av-cx__pin .av-svc-icon {
	width: 1.375rem;
	height: 1.375rem;
}

@media (max-width: 599px) {
	.av-services-page .av-cx--bento .av-cx__pin {
		width: 2.5rem;
		height: 2.5rem;
		margin: -1.25rem 0 0 -1.25rem;
	}
}

/* ------------------------------------------------------------ Event log */

.av-services-page .av-cx--bento .av-cx__journal-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	width: 100%;
	min-height: 3.25rem;
	margin: 0.75rem 0 0;
	padding: 0 1.1rem;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-r-card);
	background-color: var(--bx-glass);
	color: var(--bx-text);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.av-cx--bento .av-cx__journal-btn[hidden] {
	display: none;
}

.av-services-page .av-cx--bento .av-cx__journal-btn:hover {
	border-color: rgba(111, 163, 230, 0.6);
}

.av-cx--bento .av-cx__journal-label {
	flex: 1;
	white-space: nowrap;
}

.av-cx--bento .av-cx__journal-badge {
	display: grid;
	place-items: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background-color: var(--av-svc-red-on-navy);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.av-cx--bento .av-cx__journal-badge[hidden] {
	display: none;
}

.av-cx--bento .av-cx__journal-arrow {
	transition: transform 0.2s ease;
}

.av-cx--bento.is-journal-open .av-cx__journal-arrow {
	transform: rotate(90deg);
}

/* The log panel: shut until the button opens it.
   The theme's .av-cx__hud is a three-column status bar (≥769px:
   grid-template-columns 13–17rem | 1fr | auto, gap 1.5rem, items centred).
   The log is one column: a flex column here, so the template does not
   apply, and the bar's gap and centring are reset — centring would shrink
   the rows to their content. Phones and tablets (≤768px): a sheet fixed
   to the bottom of the screen. */
.av-services-page .av-cx--bento .av-cx__hud {
	position: fixed;
	right: 0;
	bottom: var(--av-cx-sheet-lift, 0px);
	left: 0;
	z-index: 96; /* over the site's «Наверх» (90) and cookie notice (95), under the header (100) */
	display: none;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	box-sizing: border-box;
	max-height: var(--av-cx-sheet-max, min(50vh, 30rem)); /* script: fits the screen */
	margin: 0;
	padding: 1rem var(--bx-pad) max(1rem, env(safe-area-inset-bottom));
	border: 1px solid var(--bx-line);
	border-bottom: 0;
	border-radius: var(--bx-r) var(--bx-r) 0 0;
	background-color: rgba(8, 20, 36, 0.96);
	box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.45);
	color: var(--bx-text);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.av-services-page .av-cx--bento.is-journal-open .av-cx__hud {
	display: flex;
	animation: av-cx-sheet 0.22s ease-out;
}

@keyframes av-cx-sheet {
	from {
		opacity: 0;
		translate: 0 1.5rem;
	}
}

/* The site's «Наверх» steps away while it would be over the section or
   the log sheet (script): its own hidden state, faded the same way. */
html.av-cx-totop-off .av-to-top.is-visible {
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	pointer-events: none;
	transition:
		opacity 0.25s ease,
		transform 0.25s ease,
		visibility 0s linear 0.25s;
}

.av-cx--bento .av-cx__hud-head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.av-services-page .av-cx--bento .av-cx__hud-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}

.av-services-page .av-cx--bento .av-cx__hud-close {
	display: grid;
	flex: none;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: -0.5rem -0.6rem -0.5rem 0;
	padding: 0;
	border: 0;
	border-radius: var(--bx-r-card);
	background: none;
	color: var(--bx-text-2);
	cursor: pointer;
}

.av-services-page .av-cx--bento .av-cx__hud-close:hover {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.06);
}

.av-services-page .av-cx--bento .av-cx__hud-close:focus-visible {
	outline: 2px solid #8ec5ff;
	outline-offset: 0;
}

/* Activity: a dot (green and pulsing while the system works) + count. */
.av-services-page .av-cx--bento .av-cx__log-status {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.55rem;
	margin: 0.6rem 0 0;
	padding: 0 0 0.75rem;
	border-bottom: 1px solid var(--bx-line);
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--bx-text-2);
}

.av-cx--bento .av-cx__log-live {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #5c6a83;
}

.av-cx--bento .av-cx__hud.is-live .av-cx__log-live {
	background-color: var(--av-cx-ok, #3fd08f);
	box-shadow: 0 0 0 0 rgba(63, 208, 143, 0.55);
	animation: av-cx-live 2s ease-out infinite;
}

@keyframes av-cx-live {
	to {
		box-shadow: 0 0 0 7px rgba(63, 208, 143, 0);
	}
}

.av-cx--bento .av-cx__hud.is-live [data-av-cx-log-state] {
	color: var(--bx-text);
}

.av-cx--bento .av-cx__log-count {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

/* The events: the only part that scrolls. */
.av-cx--bento .av-cx__log-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(150, 175, 215, 0.35) transparent;
}

.av-cx--bento .av-cx__log-body:focus-visible {
	outline: 2px solid #8ec5ff;
	outline-offset: -2px;
}

.av-services-page .av-cx--bento .av-cx__feed {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Time · system dot · system / event. */
.av-services-page .av-cx--bento .av-cx__feed li,
.av-services-page .av-cx--bento .av-cx__feed li:nth-child(n + 4) {
	display: grid;
	grid-template-columns: 3rem 0.5rem minmax(0, 1fr);
	gap: 0.6rem;
	align-items: start;
	padding: 0.7rem 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--bx-text-2);
}

.av-services-page .av-cx--bento .av-cx__feed li + li {
	border-top: 1px solid rgba(150, 175, 215, 0.12);
}

.av-cx--bento .av-cx__feed-time {
	padding-top: 0.1rem;
	font-size: 0.75rem;
	line-height: 1.4;
}

.av-cx--bento .av-cx__feed li i {
	width: 8px;
	height: 8px;
	margin-top: 0.35rem;
	box-shadow: 0 0 6px var(--av-cx-c);
}

.av-cx--bento .av-cx__feed-body {
	display: grid;
	gap: 0.1rem;
	min-width: 0;
	overflow-wrap: anywhere;
}

.av-cx--bento .av-cx__feed-svc {
	font-weight: 600;
	color: var(--bx-text);
}

.av-services-page .av-cx--bento .av-cx__log-empty {
	margin: 0;
	padding: 0.9rem 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--bx-text-2);
}

.av-services-page .av-cx--bento .av-cx__log-empty[hidden] {
	display: none;
}

.av-services-page .av-cx--bento .av-cx__log-note {
	flex: none;
	margin: 0;
	padding-top: 0.6rem;
	border-top: 1px solid var(--bx-line);
	font-size: 0.6875rem;
	line-height: 1.4;
	color: rgba(203, 216, 232, 0.6);
}

/* Tablets and up: the log is a card inside the photo, right, left of the
   zoom tools' column; the button stays under the photo. */
@media (min-width: 769px) {
	.av-services-page .av-cx--bento .av-cx__hud {
		position: absolute;
		right: 4.375rem;
		bottom: 4.875rem; /* the button (3.25rem + 0.75rem) + 0.875rem */
		left: auto;
		z-index: 6;
		width: min(22.5rem, calc(100% - 6.125rem));
		max-height: calc(100% - 6.625rem);
		padding: 1.1rem 1.25rem 0.9rem;
		border-bottom: 1px solid var(--bx-line);
		border-radius: var(--bx-r-card);
		box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	}

	.av-services-page .av-cx--bento.is-journal-open .av-cx__hud {
		animation-name: av-cx-log;
	}

	@keyframes av-cx-log {
		from {
			opacity: 0;
			translate: 0 0.5rem;
		}
	}
}

/* ------------------------------------------------------------ System cards */

.av-services-page .av-cx--bento .av-cx__cards {
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin: 1.25rem 0 0;
}

.av-services-page .av-cx--bento .av-cx__card {
	--av-cx-a: var(--av-cx-c, var(--av-svc-on-navy));
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0.75rem 1.1rem 0.6rem;
	border: 1px solid color-mix(in srgb, var(--av-cx-a) 30%, transparent);
	border-radius: var(--bx-r-card);
	background: linear-gradient(180deg, color-mix(in srgb, var(--av-cx-a) 7%, #0d1d33) 0%, #0b192c 100%);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.av-services-page .av-cx--bento .av-cx__card:hover {
	border-color: color-mix(in srgb, var(--av-cx-a) 60%, transparent);
}

.av-services-page .av-cx--bento .av-cx__card.is-on {
	border-color: color-mix(in srgb, var(--av-cx-a) 45%, transparent);
	background: linear-gradient(180deg, color-mix(in srgb, var(--av-cx-a) 9%, #0d1d33) 0%, #0b192c 100%);
}

/* Selected on the photo: a 2 px frame and a glow in the system colour. */
.av-services-page .av-cx--bento .av-cx__card.is-selected {
	border-color: var(--av-cx-a);
	box-shadow: inset 0 0 0 1px var(--av-cx-a), 0 0 28px -6px color-mix(in srgb, var(--av-cx-a) 55%, transparent);
}

.av-cx--bento .av-cx__card-head {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
}

.av-services-page .av-cx--bento .av-cx__card-head > * {
	grid-area: auto;
}

.av-services-page .av-cx--bento .av-cx__card-icon {
	margin: 0;
	color: var(--av-cx-a);
	opacity: 1;
}

.av-services-page .av-cx--bento .av-cx__card-icon .av-svc-icon {
	display: block;
	width: 2rem;
	height: 2rem;
}

.av-services-page .av-cx--bento .av-cx__card-title {
	align-self: center;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: normal;
}

.av-services-page .av-cx--bento .av-cx__switch {
	align-self: center;
}

.av-services-page .av-cx--bento .av-cx__card .av-cx__switch[aria-checked="true"] {
	border-color: var(--av-cx-a);
	background-color: var(--av-cx-a);
}

.av-services-page .av-cx--bento .av-cx__card-text {
	margin: 0.15rem 0 0 3rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--bx-text-2);
}

.av-cx--bento .av-cx__card-media {
	display: block;
	margin-top: 0.7rem;
	overflow: hidden;
	height: 6rem;
	border-radius: var(--bx-r-sm);
	background-color: #0a1626;
}

.av-cx--bento .av-cx__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.av-cx--bento .av-cx__card:hover .av-cx__card-media img {
	transform: scale(1.03);
}

.av-services-page .av-cx--bento .av-cx__card-more {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	align-self: flex-start;
	margin: 0.4rem 0 0;
	padding: 0.15rem 0;
	border: 0;
	background: none;
	color: #d5e0ee;
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}

.av-cx--bento .av-cx__card-more .av-svc-icon {
	transition: transform 0.2s ease;
}

.av-cx--bento .av-cx__card-more:hover .av-svc-icon,
.av-cx--bento .av-cx__card.is-selected .av-cx__card-more .av-svc-icon {
	transform: translateX(3px);
}

.av-services-page .av-cx--bento .av-cx__note {
	margin-top: 0.75rem;
	font-size: 0.75rem;
}

/* ------------------------------------------------------------ Tablets */

@media (min-width: 600px) {
	.av-services-page .av-cx--bento .av-cx__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.av-cx--bento .av-cx__scene,
	.av-cx--bento[data-av-cx] .av-cx__scene {
		height: auto;
		aspect-ratio: 16 / 9;
	}
}

@media (min-width: 900px) {
	/* Intro | stages side by side. */
	.av-cx--bento .av-cx__copy {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 2.5rem;
		align-items: start;
	}

	.av-cx--bento .av-cx__steps {
		margin-top: 0.4rem;
	}
}

/* ------------------------------------------------------------ Wide: bento */

@media (min-width: 1200px) {
	.av-cx--bento .av-cx__layout {
		grid-template-columns: minmax(0, 405fr) minmax(0, 1028fr);
		grid-template-rows: 1fr auto auto auto;
		grid-template-areas:
			"copy stage"
			"actions stage"
			"cards cards"
			"note note";
		column-gap: var(--bx-gap);
	}

	.av-cx--bento .av-cx__copy {
		display: block;
		padding: 0.25rem 0 0 0.75rem;
	}

	.av-services-page .av-cx--bento .av-svc-title {
		font-size: clamp(1.875rem, 2.5vw, 2.25rem);
		line-height: 1.05;
	}

	.av-services-page .av-cx--bento .av-svc-lead {
		margin-top: 0.5rem;
		line-height: 1.45;
	}

	/* Both buttons stay in the left column: the second one goes to its own
	   row when the column is narrower than the pair (1200–1420px, larger
	   browser text); a label wraps inside its button rather than spill. */
	.av-services-page .av-cx--bento .av-svc-system__action {
		align-self: end;
		flex-wrap: wrap;
		gap: 0.75rem 0.625rem;
		min-width: 0;
		margin: 0.875rem 0 0;
		padding-left: 0.75rem;
	}

	.av-services-page .av-cx--bento .av-svc-system__action .av-svc-btn {
		gap: 0.5rem;
		max-width: 100%;
		padding-inline: 1rem;
		font-size: 0.875rem;
		white-space: normal;
		text-align: center;
	}

	.av-cx--bento .av-cx__steps {
		gap: 0.3rem;
		margin-top: 0.85rem;
	}

	/* Smaller stage numbers: the whole row stays the button. */
	.av-services-page .av-cx--bento .av-cx__step-btn {
		grid-template-columns: 2.5rem minmax(0, 1fr);
		gap: 1rem;
		padding-block: 0.1rem;
	}

	.av-services-page .av-cx--bento .av-cx__step-num {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 0.875rem;
	}

	/* The photo fills its cell: at least 100 : 48 (the mock-up's 1035 : 571,
	   made lower), taller when the copy beside it needs more room. The image
	   covers the cell, so it is cropped, never stretched. */
	.av-cx--bento .av-cx__scene,
	.av-cx--bento[data-av-cx] .av-cx__scene {
		height: 100%;
		margin: 0;
		aspect-ratio: auto;
	}

	.av-cx--bento .av-cx__scene::before {
		content: "";
		display: block;
		padding-top: 48%;
	}

	/* Log button and panel over the photo, bottom right. */
	.av-services-page .av-cx--bento .av-cx__journal-btn {
		position: absolute;
		right: 0.875rem;
		bottom: 1rem;
		z-index: 5;
		width: 16rem;
		margin: 0;
		transition: border-color 0.2s ease, background-color 0.2s ease, translate 0.25s ease;
	}

	/* The site's fixed «Наверх» button is over it: step aside (script). */
	.av-cx--bento.is-totop-clash .av-cx__journal-btn {
		translate: -4.5rem 0;
	}

	/* The log takes the button's place on the photo: the button hides
	   while it is open (× closes it). */
	.av-services-page .av-cx--bento .av-cx__hud {
		bottom: 0.875rem;
		max-height: calc(100% - 1.75rem);
	}

	.av-services-page .av-cx--bento.is-journal-open .av-cx__journal-btn {
		visibility: hidden;
	}

	.av-services-page .av-cx--bento .av-cx__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem;
		margin-top: 1.25rem;
	}

	/* Two lines for every description, so the four photos line up. */
	.av-services-page .av-cx--bento .av-cx__card-text {
		min-height: 2.9em;
	}

	/* A strip: the mock-up's 302 × 124 at 1536 px, made lower. */
	.av-cx--bento .av-cx__card-media {
		height: auto;
		aspect-ratio: 302 / 64;
	}

	.av-cx--bento .av-cx__caption {
		max-width: 22rem;
	}
}

/* Four cards on a laptop screen: a tighter head so the titles fit. */
@media (min-width: 1200px) and (max-width: 1439px) {
	.av-services-page .av-cx--bento .av-cx__card {
		padding-inline: 1.05rem;
	}

	.av-cx--bento .av-cx__card-head {
		grid-template-columns: 1.875rem minmax(0, 1fr) auto;
		gap: 0.75rem;
	}

	.av-services-page .av-cx--bento .av-cx__card-icon .av-svc-icon {
		width: 1.875rem;
		height: 1.875rem;
	}

	.av-services-page .av-cx--bento .av-cx__card-title {
		font-size: 0.875rem;
	}

	.av-services-page .av-cx--bento .av-cx__card-text {
		margin-left: 2.625rem;
	}
}

/* ------------------------------------------------------------ Phones */

@media (max-width: 599px) {
	/* The photo uses the full width of the screen. */
	.av-cx--bento .av-cx__scene,
	.av-cx--bento[data-av-cx] .av-cx__scene {
		margin-inline: calc(var(--bx-pad) * -1);
		border-inline: 0;
		border-radius: 0;
	}

	/* Tools: one row at the bottom left (the «Наверх» button is right). */
	.av-services-page .av-cx--bento .av-cx__tools {
		top: auto;
		right: auto;
		bottom: 0.75rem;
		left: 0.75rem;
		flex-direction: row;
		gap: 0.5rem;
	}

	.av-cx--bento .av-cx__tools-group {
		flex-direction: row;
	}

	.av-services-page .av-cx--bento .av-cx__tools-group .av-cx__tool + .av-cx__tool {
		border-top: 0;
		border-left: 1px solid var(--bx-line);
	}

	/* No full-screen button on phones: a wider row would cover the
	   perimeter pin, and portrait full screen adds little (iOS has none). */
	.av-services-page .av-cx--bento .av-cx__tool--full {
		display: none;
	}

	.av-cx--bento .av-cx__caption {
		top: 0.625rem;
		left: 0.625rem;
		max-width: calc(100% - 1.25rem);
		font-size: 0.75rem;
	}

	.av-services-page .av-cx--bento .av-svc-system__action .av-svc-btn {
		flex: 1 1 100%;
	}

	/* Phones: compact cards — the photos are decorative. */
	.av-cx--bento .av-cx__card-media {
		display: none;
	}

	.av-services-page .av-cx--bento .av-cx__cards {
		gap: 0.75rem;
	}
}

/* ------------------------------------------------------------ Motion */

@media (prefers-reduced-motion: reduce) {
	.av-cx--bento .av-cx__card,
	.av-cx--bento .av-cx__card-media img,
	.av-cx--bento .av-cx__card-more .av-svc-icon,
	.av-cx--bento .av-cx__journal-btn,
	.av-cx--bento .av-cx__journal-arrow {
		transition: none;
	}

	.av-services-page .av-cx--bento.is-journal-open .av-cx__hud,
	.av-cx--bento .av-cx__hud.is-live .av-cx__log-live {
		animation: none;
	}
}
