/* Connected Process presentation for Level-Two Section 2C.
   Version 1.0.8
   - Node geometry is explicitly divided into two equal halves.
   - The upper half contains the Level-One-style number.
   - The lower half contains up to two title lines.
   - The arrow point is exactly at the half-height boundary.
   - Active detail content inherits the normal Section 2C block density/layout. */

.smm-l2-details--connected {
	--smm-process-blue: var(--blue, #1a6bc4);
	--smm-process-red: var(--red, #ef3b33);
	--smm-process-text: var(--text, #102b49);
	--smm-process-border: rgba(22, 58, 99, .12);
	--smm-process-hover-bg: #dfeefa;
	--smm-process-hover-shadow: 0 12px 30px rgba(16, 43, 73, .22);
	/* 36px accommodates the 2.2rem / line-height:1 number and two .86rem title lines. */
	--smm-node-half: 36px;
	--smm-node-height: 72px;
}

.smm-l2-details--connected > .smm-l2-subsection-description {
	max-width: 900px;
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Process strip
   ------------------------------------------------------------------------- */

.smm-l2-process-track {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 18px;
	margin: 36px 0 34px;
	overflow: visible;
}

.smm-l2-process-step {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
}

.smm-l2-process-tab {
	position: relative;
	display: block;
	width: 100%;
	padding: 0 0 12px;
	border: 0;
	background: transparent;
	color: var(--smm-process-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.smm-l2-process-tab:focus {
	outline: none;
}

.smm-l2-process-tab:focus-visible .smm-l2-process-node {
	box-shadow: 0 0 0 3px rgba(26, 107, 196, .22), var(--smm-process-hover-shadow);
}

/*
 * Exact two-half geometry:
 *   row 1 = upper 36px = number
 *   row 2 = lower 36px = title (maximum two lines)
 * The polygon point at 50% is therefore exactly on the row boundary.
 */
.smm-l2-process-node {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: var(--smm-node-half) var(--smm-node-half);
	width: 100%;
	height: var(--smm-node-height);
	min-height: var(--smm-node-height);
	padding: 0 44px 0 16px;
	border: 1px solid var(--smm-process-border);
	background:
		linear-gradient(90deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.52) 26%, rgba(255,255,255,.02) 44%),
		linear-gradient(135deg, rgba(255,255,255,.52) 0%, rgba(255,255,255,.14) 22%, rgba(26,107,196,.08) 56%, rgba(26,107,196,.20) 100%),
		linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(239,245,251,.96) 100%);
	clip-path: polygon(0 50%, 18px 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 18px 100%);
	box-shadow: 0 8px 20px rgba(16, 43, 73, .05);
	transform: translateY(0);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.smm-l2-process-node::before {
	content: "";
	position: absolute;
	inset: 1px;
	clip-path: polygon(0 50%, 18px 0, calc(100% - 27px) 0, calc(100% - 1px) 50%, calc(100% - 27px) 100%, 18px 100%);
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.10) 22%, rgba(26,107,196,.06) 58%, rgba(26,107,196,.18) 100%);
	pointer-events: none;
}

.smm-l2-process-node::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 8px;
	bottom: 8px;
	width: 6px;
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(26,107,196,.35) 0%, rgba(26,107,196,.88) 100%);
	opacity: .9;
	pointer-events: none;
}

.smm-l2-process-number,
.smm-l2-process-title {
	position: relative;
	z-index: 1;
	min-width: 0;
}

/* Exact Level-One card number typography and states. */
.smm-l2-process-number {
	grid-row: 1;
	align-self: end;
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 2.2rem;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0;
	color: #a8b6c5;
	margin: 0;
	transition: color .25s ease;
}

.smm-l2-process-title {
	grid-row: 2;
	align-self: start;
	display: -webkit-box;
	width: 100%;
	max-width: 100%;
	max-height: var(--smm-node-half);
	overflow: hidden;
	padding-top: 1px;
	font-family: 'Montserrat', sans-serif;
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--smm-process-text);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.smm-l2-process-underline {
	position: absolute;
	left: 18px;
	right: 26px;
	bottom: 0;
	height: 3px;
	border-radius: 999px;
	background: transparent;
	transition: background-color .22s ease;
}

/* Hover mirrors the Level-One linked-card interaction. */
.smm-l2-process-tab:hover .smm-l2-process-node,
.smm-l2-process-tab:focus-visible .smm-l2-process-node {
	transform: translateY(-4px);
	border-color: rgba(26, 107, 196, .22);
	background:
		linear-gradient(90deg, rgba(223,238,250,.15) 0%, rgba(223,238,250,.68) 27%, rgba(223,238,250,.32) 48%, rgba(26,107,196,.13) 100%),
		linear-gradient(180deg, rgba(245,250,254,.98) 0%, var(--smm-process-hover-bg) 100%);
	box-shadow: var(--smm-process-hover-shadow);
}

.smm-l2-process-tab:hover .smm-l2-process-number,
.smm-l2-process-tab:focus-visible .smm-l2-process-number {
	color: #6b829a;
}

.smm-l2-process-tab:hover .smm-l2-process-underline,
.smm-l2-process-tab:focus-visible .smm-l2-process-underline {
	background: var(--smm-process-red);
}

/* Active state: no hover lift/undertone, darker number + blue underline. */
.smm-l2-process-step.is-active .smm-l2-process-node,
.smm-l2-process-tab[aria-selected="true"] .smm-l2-process-node {
	transform: translateY(0);
	border-color: rgba(22, 58, 99, .12);
	background:
		linear-gradient(90deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.52) 26%, rgba(255,255,255,.02) 44%),
		linear-gradient(135deg, rgba(255,255,255,.52) 0%, rgba(255,255,255,.14) 22%, rgba(26,107,196,.08) 56%, rgba(26,107,196,.20) 100%),
		linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(239,245,251,.96) 100%);
	box-shadow: 0 8px 20px rgba(16, 43, 73, .05);
}

.smm-l2-process-step.is-active .smm-l2-process-number,
.smm-l2-process-tab[aria-selected="true"] .smm-l2-process-number {
	color: #6b829a;
}

.smm-l2-process-step.is-active .smm-l2-process-underline,
.smm-l2-process-tab[aria-selected="true"] .smm-l2-process-underline {
	background: var(--smm-process-blue);
}

/* -------------------------------------------------------------------------
   Active detail block
   ------------------------------------------------------------------------- */

.smm-l2-process-panels {
	margin-top: 0;
}

.smm-l2-process-panel[hidden] {
	display: none !important;
}

/*
 * Do not create a second "panel" design here.
 * The original .smm-l2-detail, .has-image, title, description, list and
 * gallery-trigger rules from the Level-Two template remain the renderer.
 * This makes spacing/density identical to Standard Blocks 2C.
 */
.smm-l2-detail.smm-l2-process-panel {
	margin: 0;
}

/* Keep the shared detail visual on the right for every selected item. */
.smm-l2-process-panel.has-image > .smm-l2-gallery-trigger,
.smm-l2-process-panel:nth-of-type(even).has-image > .smm-l2-gallery-trigger {
	order: initial;
}

/* Additional defining sentence, inserted within the normal copy flow. */
.smm-l2-process-definition {
	margin: 0 0 10px;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.55;
	color: var(--text, #102b49);
}

/* Typography/color swap agreed for Connected Process only. */
.smm-l2-process-panel .smm-l2-detail-description {
	color: var(--text2, #51677f);
}

.smm-l2-process-panel .smm-l2-detail-list li {
	font-size: .9rem;
	font-weight: 300;
	line-height: 1.78;
	color: #455b73;
}

/* The image stays a direct child, therefore the existing Standard Blocks rule
   supplies the exact 4px blue left bar, white surface, contained preview and +. */
.smm-l2-process-panel > .smm-l2-process-visual {
	margin: 0;
}

/* -------------------------------------------------------------------------
   Tablet / mobile
   ------------------------------------------------------------------------- */

@media (max-width: 1199px) {
	.smm-l2-process-track {
		overflow-x: auto;
		padding: 0 6px 10px 0;
		margin-right: -6px;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
	}

	.smm-l2-process-step {
		flex: 0 0 184px;
		scroll-snap-align: start;
	}
}

@media (max-width: 767px) {
	.smm-l2-process-step {
		flex-basis: 168px;
	}

	/* Keep the same two-half logic on mobile, just slightly narrower. */
	.smm-l2-process-node {
		padding-right: 38px;
		padding-left: 14px;
	}

	.smm-l2-process-title {
		font-size: .80rem;
		line-height: 1.3;
	}

	.smm-l2-process-underline {
		left: 16px;
		right: 22px;
	}
}

/* -------------------------------------------------------------------------
   Dark mode
   ------------------------------------------------------------------------- */

html[data-theme="dark"] .smm-l2-details--connected {
	--smm-process-text: #eef5fc;
	--smm-process-border: rgba(133, 176, 221, .24);
	--smm-process-hover-shadow: 0 18px 38px rgba(15, 86, 167, .24);
}

html[data-theme="dark"] .smm-l2-process-node {
	background:
		linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.12) 24%, rgba(255,255,255,.01) 42%),
		linear-gradient(135deg, rgba(120,153,191,.16) 0%, rgba(55,83,112,.16) 34%, rgba(26,107,196,.18) 72%, rgba(26,107,196,.30) 100%),
		linear-gradient(180deg, rgba(16,34,56,.96) 0%, rgba(10,24,42,.98) 100%);
}

html[data-theme="dark"] .smm-l2-process-number {
	color: #53697c;
}

html[data-theme="dark"] .smm-l2-process-tab:hover .smm-l2-process-number,
html[data-theme="dark"] .smm-l2-process-tab:focus-visible .smm-l2-process-number,
html[data-theme="dark"] .smm-l2-process-step.is-active .smm-l2-process-number,
html[data-theme="dark"] .smm-l2-process-tab[aria-selected="true"] .smm-l2-process-number {
	color: #6b829a;
}

html[data-theme="dark"] .smm-l2-process-tab:hover .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-tab:focus-visible .smm-l2-process-node {
	background: #1d384f;
}

html[data-theme="dark"] .smm-l2-process-step.is-active .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-tab[aria-selected="true"] .smm-l2-process-node {
	background:
		linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.12) 24%, rgba(255,255,255,.01) 42%),
		linear-gradient(135deg, rgba(120,153,191,.16) 0%, rgba(55,83,112,.16) 34%, rgba(26,107,196,.18) 72%, rgba(26,107,196,.30) 100%),
		linear-gradient(180deg, rgba(16,34,56,.96) 0%, rgba(10,24,42,.98) 100%);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}

/* -------------------------------------------------------------------------
   v1.0.9 final corrections
   ------------------------------------------------------------------------- */

/*
 * The tile itself no longer draws a clipped border/background.  Instead the
 * visual surface lives on ::before, where it can fade fully to transparency
 * on the left without fading the number or title with it.
 */
.smm-l2-process-node,
.smm-l2-process-tab:hover .smm-l2-process-node,
.smm-l2-process-tab:focus-visible .smm-l2-process-node,
.smm-l2-process-step.is-active .smm-l2-process-node,
.smm-l2-process-tab[aria-selected="true"] .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-tab:hover .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-tab:focus-visible .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-step.is-active .smm-l2-process-node,
html[data-theme="dark"] .smm-l2-process-tab[aria-selected="true"] .smm-l2-process-node {
	border-color: transparent;
	background: transparent;
	clip-path: none;
	box-shadow: none;
}

.smm-l2-process-node::before {
	inset: 0;
	z-index: 0;
	clip-path: polygon(0 50%, 18px 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 18px 100%);
	background:
		linear-gradient(90deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.52) 28%, rgba(255,255,255,.02) 46%),
		linear-gradient(135deg, rgba(255,255,255,.50) 0%, rgba(255,255,255,.14) 24%, rgba(26,107,196,.08) 58%, rgba(26,107,196,.20) 100%),
		linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(239,245,251,.96) 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 10%, rgba(0,0,0,.72) 22%, #000 32%, #000 100%);
	mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 10%, rgba(0,0,0,.72) 22%, #000 32%, #000 100%);
	filter: drop-shadow(0 8px 10px rgba(16, 43, 73, .05));
	transition: filter .25s ease, background .25s ease;
}

.smm-l2-process-tab:hover .smm-l2-process-node::before,
.smm-l2-process-tab:focus-visible .smm-l2-process-node::before {
	background:
		linear-gradient(90deg, rgba(223,238,250,.10) 0%, rgba(223,238,250,.68) 30%, rgba(223,238,250,.32) 50%, rgba(26,107,196,.13) 100%),
		linear-gradient(180deg, rgba(245,250,254,.98) 0%, var(--smm-process-hover-bg) 100%);
	filter: drop-shadow(0 14px 18px rgba(26, 107, 196, .12));
}

.smm-l2-process-step.is-active .smm-l2-process-node::before,
.smm-l2-process-tab[aria-selected="true"] .smm-l2-process-node::before {
	filter: drop-shadow(0 8px 10px rgba(16, 43, 73, .05));
}

html[data-theme="dark"] .smm-l2-process-node::before {
	background:
		linear-gradient(90deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.12) 28%, rgba(255,255,255,.01) 44%),
		linear-gradient(135deg, rgba(120,153,191,.16) 0%, rgba(55,83,112,.16) 34%, rgba(26,107,196,.18) 72%, rgba(26,107,196,.30) 100%),
		linear-gradient(180deg, rgba(16,34,56,.96) 0%, rgba(10,24,42,.98) 100%);
	filter: drop-shadow(0 8px 10px rgba(0,0,0,.16));
}

html[data-theme="dark"] .smm-l2-process-tab:hover .smm-l2-process-node::before,
html[data-theme="dark"] .smm-l2-process-tab:focus-visible .smm-l2-process-node::before {
	background: linear-gradient(90deg, rgba(29,56,79,.12) 0%, rgba(29,56,79,.92) 30%, #1d384f 100%);
	filter: drop-shadow(0 14px 18px rgba(15, 86, 167, .24));
}

/* Exact requested style/color swap in the active detail block. */
.smm-l2-process-panel .smm-l2-detail-description {
	color: #455b73;
}

.smm-l2-process-panel .smm-l2-detail-list li {
	font-size: .9rem;
	font-weight: 300;
	line-height: 1.78;
	color: var(--text2, #51677f);
}


/* -------------------------------------------------------------------------
   v1.0.10 corrections
   ------------------------------------------------------------------------- */

/*
 * Restore stronger blue presence toward the directional/right side while
 * preserving the full fade to transparency on the left.
 */
.smm-l2-process-node::before {
	background:
		linear-gradient(
			90deg,
			rgba(255,255,255,0) 0%,
			rgba(255,255,255,.22) 18%,
			rgba(204,225,245,.34) 36%,
			rgba(111,170,226,.22) 56%,
			rgba(69,147,219,.30) 76%,
			rgba(39,126,210,.38) 100%
		),
		linear-gradient(
			180deg,
			rgba(252,254,255,.94) 0%,
			rgba(228,239,250,.96) 100%
		);
	-webkit-mask-image: linear-gradient(
		90deg,
		transparent 0%,
		rgba(0,0,0,.20) 7%,
		rgba(0,0,0,.72) 17%,
		#000 27%,
		#000 100%
	);
	mask-image: linear-gradient(
		90deg,
		transparent 0%,
		rgba(0,0,0,.20) 7%,
		rgba(0,0,0,.72) 17%,
		#000 27%,
		#000 100%
	);
}

/* Keep the right-hand directional accent clearly visible. */
.smm-l2-process-node::after {
	background: linear-gradient(
		180deg,
		rgba(62,145,225,.60) 0%,
		rgba(26,107,196,1) 100%
	);
	opacity: 1;
}

/*
 * Actual typography swap:
 * - Description adopts the former bullet typography (more compact/stronger).
 * - Bullets adopt the former description typography (lighter/more open).
 *
 * !important is intentional here so the base Level-Two CSS cannot partially
 * override the selected presentation style.
 */
.smm-l2-process-panel .smm-l2-detail-description {
	font-size: .88rem !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: var(--text2, #3d5166) !important;
}

.smm-l2-process-panel .smm-l2-detail-list li {
	font-size: .9rem !important;
	font-weight: 300 !important;
	line-height: 1.78 !important;
	color: var(--text2, #3d5166) !important;
}

/* Dark mode: same left fade, stronger blue toward the right. */
html[data-theme="dark"] .smm-l2-process-node::before {
	background:
		linear-gradient(
			90deg,
			rgba(10,24,42,0) 0%,
			rgba(26,48,72,.30) 18%,
			rgba(36,70,106,.48) 38%,
			rgba(34,91,149,.52) 62%,
			rgba(28,104,181,.62) 82%,
			rgba(26,107,196,.72) 100%
		),
		linear-gradient(
			180deg,
			rgba(20,43,67,.96) 0%,
			rgba(11,27,45,.98) 100%
		);
}

/* v1.7.54 — Connected Process previews use their natural aspect ratio.
   Standard Blocks and all other Level-Two media retain their existing sizing. */
.smm-l2-details--connected .smm-l2-process-panel.has-image {
    align-items: start;
}

.smm-l2-details--connected .smm-l2-process-panel.has-image > .smm-l2-process-visual img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
}
