/*
 * Hadof Continuity V22.
 *
 * Turns the homepage into one guided narrative instead of stacked visual slices.
 */

:root {
	--hc22-ink: #111c28;
	--hc22-copy: #526277;
	--hc22-line: #dce4e9;
	--hc22-soft: #f5f7f8;
	--hc22-blue: #245ac4;
	--hc22-orange: #f59b1a;
}

body.hadof-v2-content .hadof-x3-home {
	background: #fff;
}

/* Chapters remain visible without alternating full-width color slabs. */
body.hadof-v2-content .hadof-x3-home > .hx-section {
	background: #fff;
	border-top: 1px solid var(--hc22-line);
}

body.hadof-v2-content .hadof-x3-home > #applications {
	border-top: 0;
}

body.hadof-v2-content .hadof-x3-home > #evidence {
	background: var(--hc22-soft);
}

body.hadof-v2-content .hadof-x3-home > #evidence :is(h2, h3) {
	color: var(--hc22-ink);
}

body.hadof-v2-content .hadof-x3-home > #evidence :is(.hx-section-head > p, .hx-evidence-grid p) {
	color: var(--hc22-copy);
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-eyebrow,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid span,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid b {
	color: var(--hc22-blue);
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a {
	background: #fff;
	border-color: var(--hc22-line);
	color: var(--hc22-ink);
}

/* One selection rail above one result: no persistent third column. */
body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] {
	background: #fff;
	border: 0;
	border-block: 1px solid var(--hc22-line);
	display: block;
	overflow: hidden;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs {
	background: #fff;
	border-bottom: 1px solid var(--hc22-line);
	display: flex;
	flex-direction: row;
	grid-column: auto;
	grid-row: auto;
	overflow-x: auto;
	padding: 0;
	scrollbar-width: none;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs::-webkit-scrollbar {
	display: none;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs::before {
	display: none;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button {
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	color: var(--hc22-copy);
	flex: 1 0 160px;
	min-height: 76px;
	padding: .9rem 1rem;
	position: relative;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button :is(span, b, small) {
	color: inherit;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button span {
	font-size: .68rem;
	margin-bottom: .15rem;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button small {
	color: #718094;
	font-size: .76rem;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button[aria-selected="true"] {
	background: #fff;
	border-bottom-color: var(--hc22-orange);
	color: var(--hc22-blue);
	padding-left: 1rem;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button[aria-selected="true"]::before {
	display: none;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__panels {
	background: #fff;
	grid-column: auto;
	grid-row: auto;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__panels > article[data-active] {
	align-items: start;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
	min-height: 0;
}

/* The image owns its aspect ratio; the grid may never stretch it into a blank field. */
body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] figure {
	align-self: start;
	aspect-ratio: 16 / 10;
	background: #edf1f3;
	height: auto;
	min-height: 0;
	position: relative;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] figure img,
body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] #hx-route-potato figure img,
body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] #hx-route-frozen figure img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100%;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] figure figcaption {
	background: linear-gradient(0deg, rgba(8, 18, 27, .88), rgba(8, 18, 27, .7));
	border-radius: 0;
	bottom: 0;
	color: #fff;
	font-size: .74rem;
	left: 0;
	line-height: 1.45;
	padding: .65rem .85rem;
	position: absolute;
	right: 0;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] article > div {
	align-content: start;
	min-height: 0;
	padding: clamp(1.75rem, 3vw, 2.6rem);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] h3 {
	font-size: clamp(1.8rem, 2.6vw, 2.5rem);
	line-height: 1.08;
	margin-bottom: 1.2rem;
	max-width: 19ch;
}

/* Process steps read as one sentence, not six miniature cards. */
body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-mini-flow {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .55rem;
	margin-block: 0 1rem;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-mini-flow li {
	border: 0;
	color: var(--hc22-copy);
	font-size: .74rem;
	padding: 0;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-mini-flow li:not(:last-child)::after {
	color: var(--hc22-orange);
	content: "→";
	margin-left: .55rem;
	position: static;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-brief-grid {
	display: block;
	margin: 0 0 1rem;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-brief-grid > div {
	align-items: start;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--hc22-line);
	display: grid;
	gap: .75rem;
	grid-template-columns: 108px minmax(0, 1fr);
	min-height: 0;
	padding: .7rem 0;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-brief-grid dt {
	color: var(--hc22-blue);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-brief-grid dd {
	margin: 0;
}

/* Project stage is a continuation of the result, not a separate blue chapter. */
body.hadof-v2-content .hadof-x3-home .hx-route-console__stage {
	background: var(--hc22-soft);
	border-top: 1px solid var(--hc22-line);
	color: var(--hc22-ink);
	gap: clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
	padding: clamp(1.5rem, 3vw, 2.2rem);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__stage legend {
	color: var(--hc22-copy);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__stage-options span {
	background: #fff;
	border-color: var(--hc22-line);
	color: var(--hc22-copy);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__stage-options input:checked + span {
	background: var(--hc22-blue);
	border-color: var(--hc22-blue);
	color: #fff;
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance {
	border-left-color: var(--hc22-line);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance > span,
body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance p {
	color: var(--hc22-copy);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance strong {
	color: var(--hc22-ink);
}

body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance a {
	color: var(--hc22-blue);
}

/* Supporting choices use whitespace and rules instead of floating tiles. */
body.hadof-v2-content .hadof-x3-home .hx-equipment-grid > a,
body.hadof-v2-content .hadof-x3-home .hx-case-list > a {
	border-radius: 0;
	box-shadow: none;
}

body.hadof-v2-content .hadof-x3-home .hx-home-event {
	border: 1px solid var(--hc22-line);
	box-shadow: none;
	margin-block: clamp(4rem, 6vw, 5.5rem);
}

@media (max-width: 900px) {
	body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button {
		flex-basis: min(58vw, 210px);
	}

	body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__panels > article[data-active] {
		grid-template-columns: 1fr;
	}

	body.hadof-v2-content .hadof-x3-home .hx-route-console__stage {
		grid-template-columns: 1fr;
	}

	body.hadof-v2-content .hadof-x3-home .hx-route-console__guidance {
		border-left: 0;
		border-top: 1px solid var(--hc22-line);
		padding-left: 0;
		padding-top: 1.25rem;
	}
}

@media (max-width: 640px) {
	body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] figure {
		aspect-ratio: 4 / 3;
	}

	body.hadof-v2-content .hadof-x3-home .hx-route-console .hx-brief-grid > div {
		gap: .25rem;
		grid-template-columns: 1fr;
	}

	body.hadof-v2-content .hadof-x3-home .hx-route-console__stage-options {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	body.hadof-v2-content .hadof-x3-home .hx-route-console__tabs {
		scroll-behavior: auto;
	}
}
