/* ============================================================
   New look - shared blocks (global, English)
   Ported from the Hebrew checker page (he/css/accessibility-checker/checker-new.css), for pages that
   use its dark-block pieces: the bento of tiles with their small product fragments (chat, statistics),
   the platform grid, the certificate card, the check list and the URL scan form.
   Loaded after new-look/base.css. Every rule is scoped by its acn- class.
   ============================================================ */

.acn-dark .acn-sec + .acn-sec {
	padding-top: 0;
}

/* Features bento */
.acn-bento {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding-inline: 0;
}

.acn-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 300px;
	padding: 36px 32px;
	overflow: hidden;
	border: 1px solid var(--acn-dark-line);
	margin: -1px 0 0 -1px;
	background: var(--acn-dark);
}

.acn-tile--tall {
	grid-column: 1 / span 2;
	grid-row: 1 / span 2;
	min-height: 620px;
}

.acn-tile:nth-child(2),
.acn-tile:nth-child(3) {
	grid-column: span 2;
}

.acn-tile--small {
	min-height: 220px;
	justify-content: flex-end;
}

.acn-tile--small svg {
	margin-bottom: auto;
	color: var(--acn-on-dark-muted);
}

.acn-tile__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* Primary purple shows while the background loads */
.acn-tile--tall .acn-tile__media {
	overflow: hidden;
	background-color: var(--acn-accent);
}

/* Blurred and dimmed like the hero video, so the white title and caption stay readable */
.acn-tile__media .acn-tile__bg {
	position: absolute;
	inset: -24px;
	width: calc(100% + 48px);
	max-width: none;
	height: calc(100% + 48px);
	max-height: none;
	object-fit: cover;
	filter: blur(6px) brightness(0.68) saturate(0.85);
}

.acn-tile > *:not(.acn-tile__media) {
	position: relative;
	z-index: 1;
}

.acn-tile__title {
	color: #ffffff;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
}

.acn-tile__text {
	color: var(--acn-on-dark-muted);
	font-size: 1rem;
}

.acn-tile--tall .acn-tile__text {
	color: rgba(255, 255, 255, 0.86);
}

.acn-tile__window {
	flex: 1 1 auto;
	min-height: 0;
	margin-block: 16px;
	overflow: hidden;
	border-radius: 10px 10px 0 0;
	background: #ffffff;
}

/* The whole page of the form, top-aligned, never cropped sideways */
.acn-tile__window {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	background: #e6e5ec;
}

.acn-tile__window img {
	display: block;
	width: 100%;
	height: auto;
}

.acn-chat,
.acn-reader {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
	padding-top: 24px;
}

.acn-chat__msg {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.9375rem;
}

.acn-chat__msg span {
	display: block;
	margin-top: 4px;
	opacity: 0.8;
	font-size: 0.8125rem;
}

.acn-chat__msg--in {
	align-self: flex-start;
	background: var(--acn-accent);
	color: #ffffff;
}

/* Full white keeps the time at 4.6:1 on the purple bubble (80% white fell to 3.6:1) */
.acn-chat__msg--in span {
	opacity: 1;
}

.acn-chat__msg--out {
	align-self: flex-end;
	background: #46454f;
	color: #ffffff;
}

/* Monitoring statistics fragment */
.acn-stats-ui {
	/* sits at the bottom of its tile, like the chat in the tile above */
	margin-top: auto;
	padding: 14px 16px 10px;
	border-radius: 10px;
	background: #ffffff;
	color: #2c2b36;
	font-size: 0.8125rem;
}

.acn-stats-ui__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.acn-stats-ui__row div {
	padding: 8px 10px;
	border: 1px solid #ececf1;
	border-radius: 8px;
}

.acn-stats-ui__row span {
	display: block;
	color: #6a6f7d;
}

.acn-stats-ui__row b {
	font-size: 1.25rem;
	font-weight: 600;
}

.acn-stats-ui__chart {
	display: block;
	width: 100%;
	height: 56px;
	margin-top: 10px;
}

.acn-stats-ui__caption {
	margin-top: 4px;
	color: #6a6f7d;
}

.acn-reader p {
	color: var(--acn-on-dark-muted);
	font-size: 0.9375rem;
}

.acn-reader__control {
	display: flex;
	align-items: center;
	gap: 8px;
	align-self: center;
	padding: 8px;
	border-radius: 12px;
	background: #ffffff;
	color: #2c2b36;
	font-size: 0.875rem;
}

.acn-reader__btn,
.acn-reader__stop {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #e3e3e8;
	border-radius: 8px;
}

.acn-reader__stop {
	color: #c4302b;
}

/* Platforms grid */
.acn-grid {
	-webkit-mask-image: radial-gradient(60% 90% at 50% 50%, #000 55%, transparent 100%);
	mask-image: radial-gradient(60% 90% at 50% 50%, #000 55%, transparent 100%);
}

.acn-grid__tiles {
	display: grid;
	grid-template-columns: repeat(11, minmax(0, 1fr));
	gap: 8px;
	max-width: 1040px;
	margin-inline: auto;
}

.acn-grid__tile {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	padding: 4px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	font-size: 0.75rem;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
}

.acn-grid__tile--on {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	background: #ececf1;
	color: #2c2b36;
	font-size: 0.75rem;
}

.acn-grid__tile--on img {
	width: 36%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

.acn-grid__tile--brand {
	background: #ffffff;
}

.acn-grid__tile--brand img {
	width: 60%;
}

/* ---- Entrance (only when the visitor allows motion; .acn-motion is set by checker-new.js) ---- */

/* Logos light up outward from the tabnav mark, a purple wave runs across the empty cells, then all stays still */
.acn-motion .acn-grid:not(.is-in) .acn-grid__tile--on,
.acn-motion .acn-grid:not(.is-in) .acn-grid__tile--brand {
	opacity: 0;
	translate: 0 10px;
	scale: 0.86;
}

.acn-motion .acn-grid.is-in .acn-grid__tile--on,
.acn-motion .acn-grid.is-in .acn-grid__tile--brand {
	animation: acn-tile-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--acn-delay, 0ms) + 250ms + var(--d) * 110ms);
}

.acn-motion .acn-grid.is-in .acn-grid__tile:not(.acn-grid__tile--on):not(.acn-grid__tile--brand) {
	animation: acn-tile-wave 1.1s ease-out;
	animation-delay: calc(var(--acn-delay, 0ms) + 150ms + var(--d) * 110ms);
}

@keyframes acn-tile-in {
	from { opacity: 0; translate: 0 10px; scale: 0.86; }
	to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes acn-tile-wave {
	0% { background-color: rgba(255, 255, 255, 0.05); }
	35% { background-color: rgba(142, 86, 220, 0.28); }
	100% { background-color: rgba(255, 255, 255, 0.05); }
}

@media (max-width: 991px) {
	.acn-grid__tiles {
		grid-template-columns: repeat(7, minmax(0, 1fr));
	}

	.acn-grid__tile:not(.acn-grid__tile--on):not(.acn-grid__tile--brand):nth-child(n + 22) {
		display: none;
	}
}

@media (max-width: 767px) {
	.acn-grid__tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.acn-grid__tile:not(.acn-grid__tile--on):not(.acn-grid__tile--brand) {
		display: none;
	}

	.acn-grid__tile {
		aspect-ratio: auto;
		min-height: 88px;
	}

	.acn-grid__tile--on img {
		width: 34px;
	}

	.acn-grid {
		-webkit-mask-image: none;
		mask-image: none;
	}
}

/* Certificate card */
.acn-cert__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 14px;
	min-height: 480px;
	padding: clamp(32px, 6vw, 80px);
	overflow: hidden;
	border-radius: var(--acn-radius);
}

.acn-cert__card.acn-ph {
	background-color: var(--acn-dark);
}

/* Video fills the card; softly blurred like the hero */
.acn-cert__video {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right center;
	filter: blur(1.5px) saturate(0.9);
}

/* Section colour washes in from the text side (left, reading start) and clears toward the person on the right */
.acn-cert__card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to right, rgba(44, 43, 54, 0.94) 0%, rgba(44, 43, 54, 0.82) 38%, rgba(44, 43, 54, 0.35) 68%, rgba(44, 43, 54, 0.1) 100%); /* taste-skill-ignore: text scrim over video */
	pointer-events: none;
}

.acn-cert__card > :not(.acn-cert__video) {
	position: relative;
	z-index: 2;
}

.acn-cert__pause {
	position: absolute;
	bottom: 16px;
	right: 20px;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font: 400 0.8125rem/1.2 inherit;
	text-decoration: underline;
	cursor: pointer;
}

.acn-cert__card > .acn-cert__pause {
	position: absolute;
}

@media (prefers-reduced-motion: reduce) {
	.acn-cert__pause {
		display: none;
	}
}

/* On phones and tablets the text runs wide, so keep a strip under it for the stop button */
@media (max-width: 991px) {
	.acn-cert__card {
		padding-bottom: 64px;
	}
}

.acn-cert__mark {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: auto;
	font-size: 1.125rem;
	font-weight: 600;
}

.acn-cert__title {
	max-width: 30ch;
	font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
	font-weight: 500;
	line-height: 1.3;
}

.acn-cert__source {
	margin-top: 8px;
	font-weight: 500;
}

.acn-cert__law {
	color: var(--acn-on-dark-muted);
	font-size: 0.9375rem;
}


/* ---------- Check list ---------- */
.acn-plan__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block: 16px;
	border-block: 1px dashed var(--acn-line); /* taste-skill-ignore: dashed rules requested by the client */
}

.acn-plan__list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.acn-plan__list svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	padding: 2px;
	border-radius: 50%;
	background: var(--acn-accent);
	color: #ffffff;
}


/* ---------- URL scan form ---------- */

.acn-scan {
	width: 100%;
	max-width: 600px;
}

.acn-scan__row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px;
	border-radius: 48px;
	background: #ffffff;
	border: 2px solid transparent;
}

.acn-scan__row:focus-within {
	outline: 3px solid var(--acn-accent-light);
	outline-offset: 3px;
}

.acn-scan.is-invalid .acn-scan__row {
	border-color: #e5484d;
}

.acn-scan__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 48px;
	background: transparent;
	color: var(--acn-ink);
	font: 400 1.0625rem/1.2 inherit;
	text-align: left;
}

.acn .acn-scan__input:focus,
.acn .acn-scan__input:focus-visible {
	outline: none;
}

.acn-scan__input::placeholder {
	color: #6b6878;
	opacity: 1;
}

.acn-scan__error {
	margin-top: 12px;
	color: #ffc2c2;
	font-size: 0.9375rem;
	font-weight: 500;
}

.acn-scan__error[hidden] {
	display: none;
}

.acn-scan__hint {
	margin-top: 12px;
	color: var(--acn-on-dark-muted);
	font-size: 0.9375rem;
}


/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.acn-bento {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.acn-tile--tall,
	.acn-tile:nth-child(2),
	.acn-tile:nth-child(3) {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.acn-tile--tall {
		min-height: 520px;
	}
}

@media (max-width: 767px) {
	/* Stacked form: input above a full-width button */
	.acn-scan__row {
		flex-direction: column;
		align-items: stretch;
		border-radius: 20px;
	}

	.acn-scan__input {
		height: 52px;
	}

	.acn-scan__row .acn-btn {
		width: 100%;
		border-radius: 14px;
	}

	.acn-bento {
		grid-template-columns: minmax(0, 1fr);
	}

	.acn-tile {
		grid-column: 1 / -1;
		min-height: 0;
		padding: 28px 22px;
	}

	.acn-tile--tall {
		min-height: 440px;
	}
}
