/**
 * Request a Match — centered split intake.
 */

body.echelon-match-page .echelon-match {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100dvh - 88px);
	padding: 40px 24px 56px;
	background: var(--echelon-parchment);
}

.echelon-match__split {
	display: grid;
	grid-template-columns: minmax(260px, 0.88fr) minmax(340px, 1.12fr);
	align-items: stretch;
	width: 100%;
	max-width: 1120px;
	min-height: min(760px, calc(100dvh - 160px));
	background: var(--echelon-bone);
	border: 0.5px solid var(--echelon-border);
	border-top: 1px solid var(--echelon-gold);
}

.echelon-match__photo {
	position: relative;
	align-self: stretch;
	min-height: 100%;
	margin: 0;
	background: var(--echelon-verde);
	overflow: hidden;
}

.echelon-match__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	opacity: 0;
	z-index: 0;
	transition: opacity 300ms ease;
}

.echelon-match__photo img.is-active {
	opacity: 1;
	z-index: 1;
}

.echelon-match__pane {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 40px 36px;
}

.echelon-match__card {
	width: 100%;
	max-width: 540px;
	min-width: 0;
	margin: 0;
	padding: 8px 4px;
	background: transparent;
	border: 0;
}

.echelon-match__kicker {
	margin: 0 0 22px;
	font-family: var(--echelon-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--echelon-sage);
}

.echelon-match__progress {
	margin: 0 0 28px;
}

.echelon-match__progress-label {
	margin: 0 0 10px;
	font-family: var(--echelon-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--echelon-verde);
}

.echelon-match__progress-track {
	height: 2px;
	background: color-mix(in srgb, var(--echelon-sage) 45%, var(--echelon-parchment));
	overflow: hidden;
}

.echelon-match__progress-fill {
	display: block;
	height: 2px;
	width: 0;
	background: var(--echelon-verde);
	transition: width 280ms ease;
}

.echelon-match__ask {
	margin: 0 0 10px;
	font-family: var(--echelon-font-display);
	font-weight: 400;
	font-size: 34px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--echelon-ink);
}

.echelon-match__ask:focus {
	outline: none;
}

.echelon-match__lede,
.echelon-match__subask {
	margin: 0 0 22px;
	font-family: var(--echelon-font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.55;
	color: var(--echelon-slate);
}

.echelon-match__subask {
	margin-bottom: 8px;
	font-family: var(--echelon-font-display);
	font-size: 26px;
	line-height: 1.25;
	color: var(--echelon-ink);
}

.echelon-match__hint {
	margin: -4px 0 8px;
	font-family: var(--echelon-font-body);
	font-size: 14px;
	line-height: 1.4;
	color: var(--echelon-sage);
}

.echelon-match__stage {
	position: relative;
}

.echelon-match__form.is-stepped .echelon-match__step {
	display: none;
}

.echelon-match__form.is-stepped .echelon-match__step.is-active {
	display: block;
	animation: echelon-match-arrive 320ms ease;
}

.echelon-match__form.is-stepped.is-back .echelon-match__step.is-active {
	animation-name: echelon-match-return;
}

.echelon-match__step > .echelon-join__field,
.echelon-match__step > .echelon-join__names,
.echelon-match__reveal-inner > .echelon-join__field {
	margin: 40px 0 0;
}

.echelon-match__step > .echelon-join__names .echelon-join__field {
	margin-top: 0;
}

.echelon-match__reveal-inner > .echelon-join__field {
	padding-top: 20px;
	background-image: linear-gradient(var(--echelon-border), var(--echelon-border));
	background-repeat: no-repeat;
	background-size: 100% 1px;
	background-position: top left;
}

.echelon-match__reveal-inner {
	min-height: 0;
}

.echelon-match__form.is-stepped .echelon-match__reveal {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 240ms ease, opacity 240ms ease;
}

.echelon-match__form.is-stepped .echelon-match__reveal.is-open {
	grid-template-rows: 1fr;
	opacity: 1;
}

.echelon-match__form.is-stepped .echelon-match__reveal:not(.is-open) .echelon-match__reveal-inner {
	overflow: hidden;
}

.echelon-match__card .echelon-join__input::placeholder {
	color: var(--echelon-slate);
	font-family: var(--echelon-font-body);
	font-weight: 400;
	font-size: 16px;
	font-style: italic;
	opacity: 1;
}

.echelon-match__nav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

.echelon-match__nav .echelon-join__submit {
	margin-top: 0;
}

.echelon-match__back,
.echelon-match__next,
.echelon-match__send {
	margin: 0;
}

.echelon-match__back {
	flex: 0 0 auto;
	min-height: 46px;
	padding: 14px 18px;
	border: 0.5px solid var(--echelon-border);
	border-radius: 3px;
	background: transparent;
	color: var(--echelon-ink);
	font-family: var(--echelon-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
	cursor: pointer;
}

.echelon-match__back:hover,
.echelon-match__back:focus-visible {
	border-color: var(--echelon-verde);
	outline: none;
}

.echelon-match__next,
.echelon-match__send {
	flex: 1 1 auto;
}

.echelon-match__form:not(.is-stepped) .echelon-match__progress,
.echelon-match__form:not(.is-stepped) .echelon-match__back,
.echelon-match__form:not(.is-stepped) .echelon-match__next,
.echelon-match__form.is-stepped .echelon-match__send {
	display: none;
}

.echelon-match__form.is-stepped.is-review .echelon-match__next {
	display: none;
}

.echelon-match__form.is-stepped.is-review .echelon-match__send {
	display: block;
}

.echelon-match__form.is-stepped .echelon-match__back[hidden],
.echelon-match__form.is-stepped [hidden] {
	display: none;
}

.echelon-match__card .echelon-match__choice-body,
.echelon-match__card .echelon-match__chip span {
	background: var(--echelon-parchment);
	transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.echelon-match__card .echelon-match__choice input:checked + .echelon-match__choice-body {
	border: 1.5px solid var(--echelon-verde);
	background: color-mix(in srgb, var(--echelon-sage) 32%, var(--echelon-parchment));
	box-shadow: inset 4px 0 0 var(--echelon-verde);
}

.echelon-match__card .echelon-match__chip span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.echelon-match__card .echelon-match__chip input:checked + span {
	border: 1.5px solid var(--echelon-verde);
	background: color-mix(in srgb, var(--echelon-sage) 32%, var(--echelon-parchment));
	color: var(--echelon-verde);
}

.echelon-match__icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: var(--echelon-verde);
}

.echelon-match__choices.is-invalid {
	outline: 1px solid #8c3a2b;
	outline-offset: 6px;
}

.echelon-match__form,
.echelon-match__step,
.echelon-match__summary,
.echelon-match__summary-item,
.echelon-match__summary-copy,
.echelon-match__summary-value {
	min-width: 0;
	max-width: 100%;
}

.echelon-match__summary {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	overflow-x: clip;
}

.echelon-match__summary-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	column-gap: 16px;
	padding: 14px 0;
	border-top: 0.5px solid var(--echelon-border);
}

.echelon-match__summary-label {
	display: block;
	overflow-wrap: anywhere;
	word-break: break-word;
	font-family: var(--echelon-font-body);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--echelon-sage);
}

.echelon-match__summary-value {
	margin: 4px 0 0;
	overflow-wrap: anywhere;
	word-break: break-word;
	font-family: var(--echelon-font-body);
	font-size: 16px;
	line-height: 1.45;
	color: var(--echelon-ink);
	white-space: pre-wrap;
}

.echelon-match__edit {
	justify-self: end;
	align-self: start;
	margin-top: 2px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--echelon-verde);
	font-family: var(--echelon-font-body);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
}

.echelon-match__edit:hover,
.echelon-match__edit:focus-visible {
	text-decoration: underline;
	outline: none;
}

.echelon-match__confirm {
	padding: 12px 4px 24px;
}

@keyframes echelon-match-arrive {
	from {
		opacity: 0;
		transform: translateX(18px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes echelon-match-return {
	from {
		opacity: 0;
		transform: translateX(-18px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 800px) {
	body.echelon-match-page .echelon-match {
		align-items: stretch;
		padding: 16px 16px 32px;
	}

	.echelon-match__split {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.echelon-match__photo {
		height: 148px;
		min-height: 148px;
	}

	.echelon-match__pane {
		padding: 28px 20px 32px;
	}

	.echelon-match__ask {
		font-size: 28px;
	}

	.echelon-match__nav {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.echelon-match__back,
	.echelon-match__next,
	.echelon-match__send {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.echelon-match__progress-fill,
	.echelon-match__form.is-stepped .echelon-match__step.is-active,
	.echelon-match__card .echelon-match__choice-body,
	.echelon-match__card .echelon-match__chip span,
	.echelon-match__photo img,
	.echelon-match__form.is-stepped .echelon-match__reveal {
		transition: none;
		animation: none;
	}
}
