/* ============================================================
   Scan waiting page (new) - split screen while the checker scans a site.
   Right: the scan (white). Left: a rounded image panel with a short text and
   the commission form image. Orange fields are image placeholders.
   Same tokens as accessibility-checker-new (checker-new.css). Scoped under .sn / .sn-page.
   ============================================================ */

.sn-page {
	margin: 0;
	background: #ffffff;
}

.sn {
	--sn-dark: #2c2b36;
	--sn-ink: #2c2b36;
	--sn-muted: #66656f;
	--sn-line: #e6e7ea;
	--sn-soft: #f8f8fb;
	--sn-accent: #8e56dc;
	--sn-accent-light: #c9a8ff;
	--sn-ph: #f97316;
	--sn-ph-2: #ea580c;
	--sn-radius: 20px;
	--sn-ease: cubic-bezier(0.22, 1, 0.36, 1);

	display: block;
	font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--sn-ink);
	background: #ffffff;
	text-align: right;
}

.sn *,
.sn *::before,
.sn *::after {
	box-sizing: border-box;
}

.sn :where(h1, h2, h3, p, ul, ol, li) {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	letter-spacing: normal;
}

.sn :where(ul, ol) {
	list-style: none;
}

.sn img {
	display: block;
	max-width: 100%;
	height: auto;
}

.sn :focus-visible {
	outline: 3px solid var(--sn-accent);
	outline-offset: 2px;
}

.sn-sr {
	position: absolute;
	width: 1px; /* taste-skill-ignore: visually hidden text */
	height: 1px; /* taste-skill-ignore: visually hidden text */
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Split screen: fills the window ---------- */

.sn-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: 16px;
	min-height: 100svh;
	padding: 16px;
}

/* ---------- Right: the scan ---------- */

.sn-scan {
	display: flex;
	flex-direction: column;
	padding: 12px clamp(24px, 5vw, 80px);
}

.sn-scan__top {
	display: flex;
	align-items: center;
	padding-block: 12px;
}

.sn-logo {
	display: inline-flex;
}

.sn-logo img {
	width: 124px;
}

/* Content sits in the middle of the column, at a reading width */
.sn-scan__body {
	width: 100%;
	max-width: 540px;
	margin-block: auto;
	padding-block: 32px;
}

/* Leave the scan: a plain text link above the content */
.sn-exit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-bottom: 20px;
	padding-block: 10px;
	color: var(--sn-muted);
	font-size: 0.9375rem;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sn-exit svg {
	transition: transform 0.2s var(--sn-ease);
}

.sn-exit:hover {
	color: var(--sn-ink);
}

.sn-exit:hover svg {
	transform: translateX(3px);
}

.sn-h1 {
	font-size: clamp(2.25rem, 1.6rem + 1.6vw, 3rem);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.sn-lead {
	margin-top: 16px;
	color: var(--sn-ink);
	font-size: 1.0625rem;
	line-height: 1.55;
}

/* ---------- Status board: one frame, cells split by lines (the checker page's frame language) ---------- */

.sn-board {
	margin-top: 36px;
	border: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	border-radius: 14px;
	background: #ffffff;
}

.sn-board__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	border-bottom: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
}

.sn-board__cell {
	padding: 18px 22px;
}

.sn-board__pct {
	min-width: 132px;
	border-inline-start: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	background: var(--sn-soft);
	border-start-end-radius: 13px;
}

.sn-board__label {
	margin-bottom: 6px;
	color: var(--sn-muted);
	font-size: 0.875rem;
}

.sn-url {
	display: flex;
	min-width: 0;
	font-size: 1.125rem;
	font-weight: 500;
}

.sn-url__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sn-progress__pct {
	font-size: 2.25rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

/* Progress */
.sn-progress {
	border-bottom: 1px dashed var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
}

.sn-progress__track {
	position: relative;
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: #ececf1;
}

.sn-progress__bar {
	position: absolute;
	inset-block: 0;
	right: 0;
	width: 0;
	border-radius: inherit;
	background: var(--sn-accent);
	transition: width 0.6s var(--sn-ease);
}

.sn-progress__count {
	margin-top: 10px;
	color: var(--sn-muted);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

/* Stages: a 2x2 grid of cells, split by lines */
.sn-stages {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sn-stage {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 60px;
	padding: 14px 16px;
	color: #8a8994;
	font-size: 0.9375rem;
	line-height: 1.3;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.sn-stage:nth-child(even) {
	border-inline-start: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
}

.sn-stage:nth-child(n + 3) {
	border-top: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
}

.sn-stage[data-state="active"] {
	color: var(--sn-ink);
	font-weight: 500;
}

.sn-stage[data-state="done"] {
	color: var(--sn-ink);
}

.sn-stage__icon {
	position: relative;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 1.5px solid #cfced6;
	border-radius: 50%;
}

.sn-stage[data-state="active"] .sn-stage__icon {
	border-color: #e6dcf7;
	border-top-color: var(--sn-accent);
	animation: sn-spin 0.9s linear infinite;
}

.sn-stage[data-state="done"] .sn-stage__icon {
	border-color: var(--sn-accent);
	background: var(--sn-accent);
}

.sn-stage[data-state="done"] .sn-stage__icon::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 6px;
	width: 5px;
	height: 8px;
	border: solid #ffffff;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.sn-hint {
	margin-top: 20px;
	color: var(--sn-muted);
	font-size: 0.9375rem;
}

.sn-scan__foot {
	padding-block: 12px;
	color: var(--sn-muted);
	font-size: 0.8125rem;
}
/* ---------- Left: image panel ---------- */

.sn-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	/* Smaller than its cell, with an outer frame line around it (the checker page's frame language) */
	min-height: calc(100svh - 32px - 28px);
	margin: 14px;
	outline: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	outline-offset: 13px;
	overflow: hidden;
	/* Square, framed by a thin line, like the cells on the checker page */
	border: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	/* White base: the gradient ends in white, so the rounded corners blend in with no dark edge */
	background: #ffffff;
	color: #ffffff;
}

/* Background: clean gradient from tabnav purple at the top to white at the bottom, with a soft
   lavender glow. No image, lines or patterns. */
.sn-panel__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 25% 55%, rgba(201, 168, 255, 0.45) 0%, transparent 65%), /* taste-skill-ignore: requested soft glow */
		linear-gradient(180deg, #8e56dc 0%, #a678eb 30%, #c9a8ff 55%, #e9dcff 78%, #ffffff 100%); /* taste-skill-ignore: requested purple-to-white gradient */
	background-repeat: no-repeat;
	background-size: cover;
}

.sn-panel__text {
	position: relative;
	z-index: 1;
	padding: clamp(32px, 4vw, 56px);
}

.sn-panel__kicker {
	margin-bottom: 14px;
	font-size: 1.0625rem;
	font-weight: 500;
}

.sn-panel__quote {
	max-width: 20ch;
	font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/* Frame lines on the panel, like the checker page: two verticals on the form's edges, and a dashed
   rule under the text that meets them. The text starts on the same line as the form's edge. */
.sn-panel::before,
.sn-panel::after {
	content: "";
	position: absolute;
	inset-block: 0;
	z-index: 1;
	width: 1px;
	background: rgba(255, 255, 255, 0.32);
	pointer-events: none;
}

.sn-panel::before {
	left: 12%;
}

.sn-panel::after {
	right: 12%;
}

.sn-panel__text {
	z-index: 2;
	margin-inline: 12%;
	padding: clamp(32px, 4vw, 56px) clamp(20px, 2vw, 28px) clamp(24px, 3vw, 36px);
	border-bottom: 1px dashed rgba(255, 255, 255, 0.5); /* taste-skill-ignore: frame lines are the brand's checker-page language */
}
/* The commission form video: centred between the panel's frame lines, square corners, subtle border */
.sn-panel__form {
	position: absolute;
	bottom: clamp(52px, 8%, 80px);
	left: 50%;
	z-index: 2;
	width: 76%;
	transform: translateX(-50%);
}

.form-fill-video {
	aspect-ratio: 16 / 9;
	border: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	border-radius: 0;
	background: #ffffff;
	box-shadow: 0 24px 48px -24px rgba(44, 24, 90, 0.35); /* taste-skill-ignore: the form sheet floats on the panel */
}

.form-fill-video__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Disclaimer under the video's bottom-left corner: it is a simulation, not the visitor's own form */
.form-fill-video__note {
	position: absolute;
	top: 100%;
	left: -1px;
	margin-top: 8px;
	padding: 4px 10px;
	background: #ffffff;
	color: var(--sn-ink);
	font-size: 0.8125rem;
	line-height: 1.4;
	white-space: nowrap;
}

/* Pause / play (WCAG 2.2.2) */
.form-fill-video__toggle {
	position: absolute;
	bottom: 10px;
	left: 10px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(44, 43, 54, 0.82);
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.form-fill-video__toggle[hidden] {
	display: none;
}

.form-fill-video__toggle:hover {
	background: var(--sn-dark);
}

.form-fill-video__play,
.form-fill-video.is-paused .form-fill-video__pause {
	display: none;
}

.form-fill-video.is-paused .form-fill-video__play {
	display: block;
}
/* ---------- Motion ---------- */

@keyframes sn-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.sn *,
	.sn *::before,
	.sn *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- One frame across both halves ----------
   The scan column continues the panel's outer frame line: its top and bottom lines meet the panel's
   frame, its far side closes it, and dashed rules under the logo and above the footer split it into
   rows like the checker page's cells. */

@media (min-width: 992px) {
	.sn-split {
		column-gap: 0;
	}

	.sn-scan {
		padding: 0;
		border: 1px solid var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
		border-inline-end: 0;
	}

	.sn-scan__top,
	.sn-scan__foot {
		padding: 18px clamp(24px, 4vw, 64px);
	}

	.sn-scan__top {
		border-bottom: 1px dashed var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	}

	.sn-scan__foot {
		border-top: 1px dashed var(--sn-line); /* taste-skill-ignore: frame lines are the brand's checker-page language */
	}

	.sn-scan__body {
		padding-inline: clamp(24px, 4vw, 64px);
		max-width: calc(540px + 2 * clamp(24px, 4vw, 64px));
	}
}
/* ---------- Short laptop screens: tighter spacing so the page still fits the window ---------- */

@media (min-width: 992px) and (max-height: 820px) {
	.sn-scan__top {
		padding-block: 4px;
	}

	.sn-scan__body {
		padding-block: 12px;
	}

	.sn-exit {
		margin-bottom: 8px;
	}

	.sn-h1 {
		font-size: clamp(1.875rem, 1.3rem + 1.2vw, 2.5rem);
	}

	.sn-board {
		margin-top: 22px;
	}

	.sn-board__cell {
		padding-block: 12px;
	}

	.sn-stage {
		min-height: 48px;
		padding-block: 10px;
	}

	.sn-hint {
		margin-top: 12px;
	}

	.sn-scan__foot {
		padding-block: 6px;
	}
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
	.sn-split {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.sn-scan__body {
		margin-inline: auto;
	}

	/* Stacked: the panel grows with its content, and the form video sits under the text in the flow
	   (no longer pinned to the bottom, where it covered the headline) */
	.sn-panel {
		min-height: 0;
		margin: 12px;
		padding-bottom: 64px;
		outline-offset: 11px;
	}

	.sn-panel__form {
		position: relative;
		bottom: auto;
		left: auto;
		width: auto;
		margin: 28px 12% 0;
		transform: none;
	}
}

@media (max-width: 767px) {
	.sn-split {
		padding: 10px;
	}

	.sn-scan {
		padding-inline: 14px;
	}

	.sn-scan__body {
		padding-block: 24px;
	}

	.sn-stages {
		grid-template-columns: minmax(0, 1fr);
	}

	.sn-stage:nth-child(even) {
		border-inline-start: 0;
	}

	.sn-stage:nth-child(n + 2) {
		border-top: 1px solid var(--sn-line);
	}

	.sn-board__cell,
	.sn-stage {
		padding-inline: 16px;
	}

	.sn-panel {
		margin: 10px;
		padding-bottom: 72px;
		outline-offset: 9px;
	}

	/* Narrow screens: frame lines closer to the edges so the text and video get the width */
	.sn-panel::before {
		left: 6%;
	}

	.sn-panel::after {
		right: 6%;
	}

	.sn-panel__text {
		margin-inline: 6%;
		padding: 28px 16px 22px;
	}

	.sn-panel__quote {
		font-size: 1.625rem;
	}

	.sn-panel__form {
		margin: 24px 6% 0;
	}

	.form-fill-video__note {
		right: -1px;
		white-space: normal;
	}
}


/* Long domains never widen the card: the script caps them at 30 characters, and this cuts the rest with "…" */
.sn-url {
	min-width: 0;
	overflow: hidden;
}

.sn-url__text {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}
