/*
 * v1.2.3 — routing and pathway repair
 *
 * This final repair layer is intentionally loaded after the locked design
 * system. It resolves the recurring reading, contrast, spacing and mobile
 * faults without replacing the Search Intelligence visual language.
 */

/* Homepage: remove the full visual hero and retain only a concise executive orientation. */
.si-home-intro {
	padding: clamp(3.5rem, 6vw, 6rem) var(--si-gutter, 24px) clamp(3rem, 5vw, 5rem);
	background: #ffffff;
	border-bottom: 1px solid #d7e2ec;
}

.si-home-intro__copy {
	max-width: 58rem;
}

.si-home-intro h1 {
	max-width: 14ch;
	margin: 0.8rem 0 1.35rem;
	color: #09294e;
	font-size: clamp(2.8rem, 2.05rem + 2.65vw, 4.65rem);
	line-height: 0.98;
	letter-spacing: -0.055em;
}

.si-home-intro__lead {
	max-width: 52rem;
	margin: 0;
	color: #173d68;
	font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem);
	line-height: 1.55;
}

.si-home-intro__support {
	max-width: 50rem;
	margin: 1rem 0 0;
	color: #365779;
	font-size: 1rem;
	line-height: 1.6;
}

.si-home-intro .si-action-row {
	align-items: flex-start;
	margin-top: 1.75rem;
}

.si-home-intro .si-trust-line {
	margin: 1.15rem 0 0;
	color: #4e6d8c;
}

/* Home chapters use one controlled display scale. Distinct operating-model
 * sections may retain contrast, but no longer compete through arbitrary size. */
.si-home-section > .si-home-shell > h2 {
	max-width: 15ch;
	font-size: clamp(2.65rem, 2.05rem + 2.3vw, 4.35rem);
	line-height: 0.99;
	letter-spacing: -0.05em;
}

.si-home-section .si-layer-system__thesis h2,
.si-home-section .si-progression__thesis h2 {
	font-size: clamp(3rem, 2.25rem + 2.4vw, 4.55rem);
}

/* Do not turn decision paths into horizontal carousels. The visible layout
 * reflows from three columns, to two, to one without clipping or scrolling. */
.si-section [data-role="pathway-row"] {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: clamp(0.8rem, 1.6vw, 1.25rem);
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: visible !important;
	overscroll-behavior: auto;
	scroll-snap-type: none !important;
}

.si-section [data-role="pathway-row"] > .si-panel {
	width: auto;
	min-width: 0;
	min-height: 10.75rem;
	margin: 0;
	padding: clamp(1.25rem, 2vw, 1.65rem);
	border: 1px solid #c4d7e7;
	border-radius: 0.9rem;
	background: linear-gradient(145deg, #ffffff, #eef5fa);
	box-shadow: 0 0.8rem 2rem rgba(16, 54, 91, 0.08);
	scroll-snap-align: none;
}

.si-section [data-role="pathway-row"] > .si-panel :is(h3, h4) {
	margin: 0 0 0.7rem;
	color: #0b315b;
	font-size: clamp(1.2rem, 1.05rem + 0.35vw, 1.45rem);
	line-height: 1.14;
}

.si-section [data-role="pathway-row"] > .si-panel p {
	margin: 0;
	color: #315779;
	font-size: 0.98rem;
	line-height: 1.55;
}

/* Pale tiles on a navy decision surface cannot carry navy-surface text.
 * Darken the decision panel itself and carry a fully legible text hierarchy. */
.si-section--navy [data-role="pathway-row"] > .si-panel,
.si-section[data-content-role="governance"] [data-role="pathway-row"] > .si-panel,
.si-section[data-component="governance-field"] [data-role="pathway-row"] > .si-panel {
	border-color: rgba(148, 193, 231, 0.34);
	background: linear-gradient(145deg, #123760, #0c294f);
	box-shadow: none;
}

.si-section--navy [data-role="pathway-row"] > .si-panel :is(h3, h4),
.si-section[data-content-role="governance"] [data-role="pathway-row"] > .si-panel :is(h3, h4),
.si-section[data-component="governance-field"] [data-role="pathway-row"] > .si-panel :is(h3, h4) {
	color: #ffffff;
}

.si-section--navy [data-role="pathway-row"] > .si-panel p,
.si-section[data-content-role="governance"] [data-role="pathway-row"] > .si-panel p,
.si-section[data-component="governance-field"] [data-role="pathway-row"] > .si-panel p {
	color: #d3e4f2;
}

/* Decision Confidence: seven visible steps, arranged as a deliberate
 * executive pathway rather than a swipeable set of generic cards. */
.si-confidence-pathway {
	margin-top: clamp(1.6rem, 3vw, 2.5rem);
	padding: clamp(1.1rem, 2.6vw, 2rem);
	border: 1px solid #245183;
	border-radius: 1rem;
	background: linear-gradient(140deg, #071d3f, #0b2f60);
	box-shadow: 0 1rem 2.2rem rgba(8, 36, 69, 0.16);
}

.si-confidence-pathway ol {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.8rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.si-confidence-pathway li {
	display: grid;
	grid-template-columns: 1.8rem minmax(0, 1fr);
	gap: 0.65rem;
	align-content: start;
	min-width: 0;
	min-height: 10.8rem;
	padding: 1.25rem 1rem;
	border: 1px solid rgba(170, 208, 239, 0.26);
	border-radius: 0.78rem;
	background: linear-gradient(145deg, rgba(23, 66, 109, 0.96), rgba(14, 47, 84, 0.96));
}

.si-confidence-pathway li:nth-child(2n) {
	background: linear-gradient(145deg, rgba(19, 55, 94, 0.96), rgba(10, 40, 75, 0.96));
}

.si-confidence-pathway li:nth-child(4n) {
	border-color: rgba(83, 171, 241, 0.68);
	background: linear-gradient(145deg, #164d82, #10386a);
}

.si-confidence-pathway__number {
	color: #78c1f5;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: 0.08em;
}

.si-confidence-pathway h3 {
	margin: 0;
	color: #ffffff;
	font-size: clamp(1.05rem, 0.92rem + 0.35vw, 1.26rem);
	line-height: 1.14;
}

.si-confidence-pathway p {
	margin: 0.65rem 0 0;
	color: #d4e5f3;
	font-size: 0.92rem;
	line-height: 1.5;
}

/* Keep action rows directly beneath their related copy, including on mobile. */
.si-section .si-action-row,
.si-section .si-cluster {
	align-items: flex-start;
}

@media (max-width: 960px) {
	.si-section [data-role="pathway-row"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.si-confidence-pathway ol {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.si-home-intro {
		padding-top: 3rem;
		padding-bottom: 2.7rem;
	}

	.si-home-intro h1 {
		max-width: 11ch;
		font-size: clamp(2.45rem, 11vw, 3.25rem);
	}

	.si-home-intro .si-action-row {
		flex-direction: column;
		align-items: stretch;
	}

	.si-home-intro .si-action-row .si-button {
		width: 100%;
		justify-content: center;
	}

	.si-home-section > .si-home-shell > h2,
	.si-home-section .si-layer-system__thesis h2,
	.si-home-section .si-progression__thesis h2 {
		font-size: clamp(2.45rem, 10vw, 3.35rem);
	}

	.si-section [data-role="pathway-row"],
	.si-confidence-pathway ol {
		grid-template-columns: minmax(0, 1fr);
	}

	.si-section [data-role="pathway-row"] > .si-panel,
	.si-confidence-pathway li {
		min-height: 0;
	}
}
