/**
 * Governance Context Types — section head + UslDiagram.jsx
 */

.governance-context-types {
	--ctx-brand: #0760ff;
	--ctx-brand-600: #0654e0;
	--ctx-brand-700: #0a44b8;
	--ctx-violet: #7c5cff;
	--ctx-fill: linear-gradient(135deg, var(--ctx-brand) 0%, var(--ctx-violet) 100%);
	--ctx-ink: #0d0f17;
	--ctx-surface: #ffffff;
	--ctx-surface-2: #fafbff;
	--ctx-section: #ffffff;
	--ctx-section-alt: #f9f9fb;
	--ctx-mist: #f2f5fc;
	--ctx-line: rgba(15, 23, 51, 0.06);
	--ctx-slate: #5a6478;
	--ctx-shadow: rgba(13, 20, 36, 0.16);
	--ctx-ease: cubic-bezier(0.16, 1, 0.3, 1);

	padding: 80px 0 ;
	background-color: var(--ctx-section);
}

html.theme-dark .governance-context-types {
	--ctx-brand: #4b95e4;
	--ctx-brand-600: #6ba9eb;
	--ctx-brand-700: #2e7ad6;
	--ctx-violet: #9b7dff;
	--ctx-section: #0c1126;
	--ctx-section-alt: #0e142c;
	--ctx-ink: #eef2fb;
	--ctx-surface: #141a32;
	--ctx-surface-2: #111733;
	--ctx-mist: #111733;
	--ctx-line: rgba(255, 255, 255, 0.07);
	--ctx-slate: #a2adc6;
	--ctx-shadow: rgba(0, 0, 0, 0.5);
	background-color: var(--ctx-section);
}

.governance-context-types p {
	padding-bottom: 0 !important;
}

.governance-context-types__shell {
	width: 100%;
	max-width: 1425px;
	margin-inline: auto;
	padding-inline: 24px;
}



/* Page banner — first section on semantics route (main > section:first-of-type .t-section-title) */
.governance-context-types__title {
	margin: 0;
	font-size: clamp(2.7rem, 6.4vw, 4.6rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.03em;
	text-wrap: balance;
	color: var(--ctx-ink);
}

.governance-context-types__lead {
	margin: 1.25rem 0 0;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.625;
	color: var(--ctx-slate);
}

/* UslDiagram figure */
.governance-context-types__diagram {
	margin: 4rem 0 0;
	padding: 1.25rem;
	border-radius: 1.5rem;
	border: 1px solid var(--ctx-line);
	background: var(--ctx-surface-2);
}

@media (min-width: 640px) {
	.governance-context-types__diagram {
		padding: 2rem;
	}
}

.governance-context-types__diagram-eyebrow {
	margin: 0;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--ctx-brand);
}

.governance-context-types__diagram-scroll {
	margin-top: 2.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.governance-context-types__diagram-flow {
	display: flex;
	align-items: stretch;
	gap: 0.75rem;
	min-width: 720px;
	/* max-width: 980px; */
	margin-inline: auto;
}

.governance-context-types__stage {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
}

.governance-context-types__stage-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.governance-context-types__stage-badge {
	display: inline-flex;
	padding: 0.125rem 0.5rem;
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--ctx-slate);
	background: var(--ctx-mist);
}

.governance-context-types__stage-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--ctx-slate);
}

.governance-context-types__stage-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: center;
}

.governance-context-types__stage-body--tracks {
	gap: 0.75rem;
}

/* Source hero card — gradient border */
.governance-context-types__source-card {
	padding: 1.25rem;
	border-radius: 1rem;
	border: 2px solid transparent;
	background:
		linear-gradient(var(--ctx-surface), var(--ctx-surface)) padding-box,
		var(--ctx-fill) border-box;
	transition: transform 0.2s var(--ctx-ease);
}

.governance-context-types__source-card:hover {
	transform: translateY(-2px);
}

.governance-context-types__icon-chip {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
	color: #ffffff;
}

.governance-context-types__icon-chip--gradient {
	background: var(--ctx-fill);
}

.governance-context-types__icon-chip svg {
	width: 1.5rem;
	height: 1.5rem;
	stroke: currentColor;
}

.governance-context-types__source-title {
	margin: 0.75rem 0 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ctx-ink);
}

.governance-context-types__source-subtitle {
	margin: 0.40rem 0 0;
	font-size: 15px;
	line-height: 1.375;
	color: var(--ctx-slate);
}

/* Serving track cards */
.governance-context-types__track-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-radius: 1rem;
	border: 1px solid var(--ctx-line);
	background: var(--ctx-surface);
	transition: transform 0.2s var(--ctx-ease);
}

.governance-context-types__track-card:hover {
	transform: translateY(-2px);
}

.governance-context-types__track-text {
	min-width: 0;
}

.governance-context-types__track-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ctx-ink);
}

.governance-context-types__track-subtitle {
	margin: 0.40rem 0 0 0;
	font-size: 15px;
	line-height: 1.375;
	color: var(--ctx-slate);
}

/* Connectors */
.governance-context-types__connector {
	display: flex;
	flex-shrink: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	align-self: center;
}

.governance-context-types__connector-label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--ctx-slate);
}

.governance-context-types__connector-arrow,
.governance-context-types__connector-arrow svg {
	width: 1.25rem;
	height: 1.25rem;
	color: var(--ctx-brand);
	stroke: currentColor;
}

/* Consumers 2×2 */
.governance-context-types__consumer-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.governance-context-types__consumer-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 0.75rem;
	border-radius: 1rem;
	border: 1px solid var(--ctx-line);
	background: var(--ctx-surface);
	transition: transform 0.2s var(--ctx-ease);
}

.governance-context-types__consumer-card:hover {
	transform: translateY(-2px);
}

.governance-context-types__consumer-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	color: var(--ctx-brand);
	background: color-mix(in srgb, var(--ctx-brand) 10%, transparent);
}

.governance-context-types__consumer-icon svg {
	width: 1.25rem;
	height: 1.25rem;
	stroke: currentColor;
}

.governance-context-types__consumer-label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ctx-ink);
}

/* Feature chips */
.governance-context-types__features {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.governance-context-types__feature-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	border: 1px solid var(--ctx-line);
	background: var(--ctx-surface);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	color: #334155;
}

html.theme-dark .governance-context-types__feature-chip {
	color: var(--ctx-slate);
}

.governance-context-types__feature-dot {
	flex-shrink: 0;
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 50%;
	background: var(--ctx-brand);
}

.governance-context-types__diagram-caption {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ctx-slate);
}

/* Reveal */
.ctx-reveal {
	opacity: 0;
	will-change: opacity, transform;
}

.ctx-reveal.is-visible {
	animation: ctx-reveal-up 0.55s var(--ctx-ease) var(--reveal-delay, 0ms) forwards;
}

@keyframes ctx-reveal-up {
	from { opacity: 0; transform: translate3d(0, 14px, 0); }
	to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.ctx-reveal.reveal-done {
	animation: none;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.governance-context-types__source-card,
	.governance-context-types__track-card,
	.governance-context-types__consumer-card {
		transition: none;
	}

	.governance-context-types__source-card:hover,
	.governance-context-types__track-card:hover,
	.governance-context-types__consumer-card:hover {
		transform: none;
	}

	.ctx-reveal {
		opacity: 1;
		animation: none !important;
	}
}
