.nsc-pipeline {
	--nsc-pl-label-w: 220px;
	--nsc-pl-row-h: 56px;
	--nsc-pl-bar-h: 40px;
	--nsc-pl-bar-radius: 999px;
	--nsc-pl-split-gap: 1px;
	--nsc-pl-diamond: 16px;
	--nsc-pl-diamond-nudge: 0px;
	--nsc-pl-chart-pad: 24px;
	--nsc-pl-bar-top: #3CCBE9;
	--nsc-pl-bar-bottom: #1A6CE7;
	--nsc-pl-bar-solid: #003D97;
	--nsc-pl-diamond-color: #3CCBE9;
	width: 100%;
}

/*
 * Only the chart (axis + rows) scrolls horizontally below its min-width —
 * row labels and bars stay proportionally readable instead of squeezing
 * down to nothing on narrow screens. Callouts sit outside this wrapper so
 * they keep wrapping/stacking normally regardless of chart width — see the
 * note on .nsc-pipeline__callout-spacer below for the trade-off this makes.
 */
.nsc-pipeline__scroll {
	width: 100%;
	overflow-x: auto;
}

.nsc-pipeline__chart {
	position: relative;
	min-width: 900px;
	padding: var(--nsc-pl-chart-pad);
	box-sizing: border-box;
}

.nsc-pipeline__axis,
.nsc-pipeline__row {
	display: flex;
	align-items: center;
}

.nsc-pipeline__axis {
	margin-bottom: 12px;
}

.nsc-pipeline__axis-spacer {
	flex: 0 0 var(--nsc-pl-label-w);
	width: var(--nsc-pl-label-w);
}

.nsc-pipeline__axis-track {
	position: relative;
	flex: 1 1 auto;
	height: 1.5em;
}

.nsc-pipeline__axis-label {
	position: absolute;
	top: 0;
	white-space: nowrap;
}

.nsc-pipeline__axis-label--center {
	transform: translateX(-50%);
}

.nsc-pipeline__axis-label--right {
	transform: translateX(-100%);
}

/*
 * A short ruler tick per calendar month, anchored to the bottom of the
 * axis row (below the year labels) — purely a positioning reference for
 * setting Bar Start/End and Diamond Position values, not shown to end
 * users as data. See .nsc-pipeline__month-guide below for the matching
 * full-height version running behind the bars.
 */
.nsc-pipeline__month-tick {
	position: absolute;
	bottom: 0;
	width: 1px;
	height: 6px;
	background-color: rgba(255, 255, 255, 0.35);
}

/* Taller + brighter than .nsc-pipeline__month-tick — a middle tier between
   the year labels and the plain month ticks, same idea as the half-inch
   mark on a physical ruler. */
.nsc-pipeline__half-year-tick {
	position: absolute;
	bottom: 0;
	width: 1px;
	height: 10px;
	background-color: rgba(255, 255, 255, 0.55);
}

.nsc-pipeline__rows {
	position: relative;
}

/*
 * min-height (not height) plus align-items:stretch (the flex default,
 * stated explicitly here) — a row label that wraps to 2 lines on a narrow
 * label column must be able to grow the row taller, or it silently
 * overflows past a fixed height and overlaps the row below instead of
 * pushing it down. The row-track then stretches to match automatically,
 * so the bar's `top: 50%` (relative to row-track's own height) still
 * centers correctly without needing a height:100% percentage hack.
 */
.nsc-pipeline__row {
	position: relative;
	z-index: 1;
	min-height: var(--nsc-pl-row-h);
	align-items: stretch;
}

.nsc-pipeline__row-label {
	display: flex;
	align-items: center;
	flex: 0 0 var(--nsc-pl-label-w);
	width: var(--nsc-pl-label-w);
	padding-right: 16px;
	text-transform: uppercase;
	box-sizing: border-box;
}

.nsc-pipeline__row-track {
	position: relative;
	flex: 1 1 auto;
}

/*
 * On phones, a side-by-side label column squeezes the actual bars into a
 * narrow remainder AND forces the whole chart to horizontally scroll just
 * to fit that reserved column (see Chart Min Width) — so instead, stack
 * each row's label above its own bar, full width. Zeroing
 * --nsc-pl-label-w is what makes this a single coherent change rather
 * than a pile of one-off overrides: the axis spacer, the overlay's
 * left-offset (gridlines/guides/today line), and the row label's own
 * flex-basis all already derive from this one variable, so they collapse
 * into a full-width layout together. min-width:0 on the chart itself
 * then drops the forced horizontal scroll, since there's no longer a
 * label column's width to protect bars from being squeezed by.
 *
 * Trade-off accepted deliberately: the faint gridlines/month-guides now
 * run behind each row's label text too, since they still span the full
 * height of .nsc-pipeline__rows (which now includes the label lines) —
 * not worth splitting that element per-row just to carve the labels out.
 */
@media (max-width: 767px) {
	/*
	 * A fixed px value (60% of the 16px default), not calc() against the
	 * variable's own current value — combining !important (needed here,
	 * same as Chart Background above, since Elementor's generated CSS for
	 * Milestone Diamond Size targets a more specific per-instance
	 * selector) with a self-reference produces an invalid-value cycle in
	 * some browsers, silently zeroing the diamond out entirely rather
	 * than scaling it. If you change Milestone Diamond Size, update this
	 * to 60% of the new value too.
	 */
	.nsc-pipeline {
		--nsc-pl-diamond: 9.6px !important;
	}

	/*
	 * opacity (not a new background-color) so this halves whatever the
	 * Half-Year Guide Color control is actually set to, including if it's
	 * customized, rather than hardcoding a value that would silently stop
	 * matching a user's own color choice.
	 */
	.nsc-pipeline__half-year-tick,
	.nsc-pipeline__half-year-guide {
		opacity: 0.5;
	}

	/*
	 * The 2026 mark sits at the chart's Start Value (mid-2026, left-
	 * aligned) while 2027 is the first center-aligned mark just a
	 * half-year later — on a narrow mobile chart that's a much smaller
	 * pixel gap than between any other two consecutive year marks, so
	 * their label text can crowd or touch. nth-child(2) — not a class
	 * like :first-of-type, which would key off tag name and match 2026
	 * itself since both are plain <span>s — targets the axis-track's 2nd
	 * child specifically, which is 2027 given this widget's default 4
	 * Axis Marks (2026 left-aligned, then 2027/2028 center, 2029 right).
	 * Revisit this selector if Axis Marks is ever reconfigured.
	 */
	.nsc-pipeline__axis-track > span:nth-child(2) {
		margin-left: 10px;
	}

	/*
	 * --nsc-pl-label-w itself is NOT overridden here — it already zeroes
	 * out via the Label Column Width control's own Mobile default (see
	 * the widget's PHP), which is the correct place for it: Elementor's
	 * per-instance generated CSS for that control would otherwise fight a
	 * hardcoded override here at equal specificity (whichever loads later
	 * wins, unpredictably) — and it would also silently override a user's
	 * own explicit customization of that control.
	 */
	.nsc-pipeline__chart {
		min-width: 0;
		padding-left: 0;
		padding-right: 0;
	}

	/*
	 * The Chart Background tint reads as a distinct "card" on a wide
	 * desktop chart, but on a full-width mobile layout (no left/right
	 * chart padding, no reserved label column) it would run edge-to-edge
	 * and just look like a plain color change rather than a panel — not
	 * worth it, so switch it off here. !important because the Chart
	 * Background control's own generated CSS targets this same property
	 * on a more specific per-instance selector, which would otherwise win
	 * regardless of source order.
	 */
	.nsc-pipeline__overlay {
		background-color: transparent !important;
	}

	.nsc-pipeline__row {
		flex-direction: column;
		align-items: stretch;
		margin-bottom: 18px;
	}

	.nsc-pipeline__row:last-child {
		margin-bottom: 0;
	}

	.nsc-pipeline__row-label {
		width: 100%;
		flex: 0 0 auto;
		padding-right: 0;
		padding-bottom: 8px;
	}

	.nsc-pipeline__row-track {
		width: 100%;
		height: calc(var(--nsc-pl-bar-h) + 8px);
	}

	/*
	 * opacity:0/visibility:hidden (the desktop hide-state) still occupies
	 * layout space — harmless on desktop, where the chart is wide enough
	 * to absorb a centered tooltip, but on a narrow bar here a wide
	 * tooltip's invisible box can extend past .nsc-pipeline__chart's own
	 * edge and inflate .nsc-pipeline__scroll's scrollWidth, forcing a
	 * horizontal scrollbar for content nobody can actually see. display:none
	 * removes it from layout entirely instead — losing the fade transition,
	 * but a tap-to-reveal doesn't need one the way a mouse hover does.
	 */
	.nsc-pipeline__tooltip {
		display: none;
	}

	.nsc-pipeline__bar-wrap:hover .nsc-pipeline__tooltip,
	.nsc-pipeline__bar-wrap:focus .nsc-pipeline__tooltip,
	.nsc-pipeline__bar-wrap:focus-within .nsc-pipeline__tooltip {
		display: block;
	}
}

/*
 * Sits behind every row (z-index 0, rows are z-index 1) and spans the full
 * rows height via top/bottom:0 on an absolutely positioned wrapper — kept
 * out of the axis and callouts areas entirely, matching the reference
 * design where the grid/today line only run through the bars themselves.
 * Left-offset by the label column width so its 0-100% positions line up
 * with the axis marks above and the bars below, which all share the same
 * track width. Also carries the Chart Background tint (flat, no
 * border-radius) — this element's own bounds are already exactly "as tall
 * as the gridlines and no further left than the bars", which is exactly
 * what that background is meant to cover.
 */
.nsc-pipeline__overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--nsc-pl-label-w);
	right: 0;
	background-color: rgba(255, 255, 255, 0.04);
	pointer-events: none;
	z-index: 0;
}

.nsc-pipeline__gridline {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: rgba(255, 255, 255, 0.15);
}

/* Fainter than .nsc-pipeline__gridline (the year lines) — a reference
   ruler for positioning bars, not meant to compete visually with them. */
.nsc-pipeline__month-guide {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: rgba(255, 255, 255, 0.06);
}

/* Between .nsc-pipeline__gridline (year, 0.15) and .nsc-pipeline__month-guide
   (0.06) in visual weight. */
.nsc-pipeline__half-year-guide {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: rgba(255, 255, 255, 0.10);
}

.nsc-pipeline__today {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 2px dashed rgba(255, 255, 255, 0.55);
}

/*
 * Positions the whole bar (previously this lived on .nsc-pipeline__bar
 * itself) — split out so the diamond and tooltip below can sit as its
 * siblings, sized/positioned relative to the bar's own box, without being
 * clipped by .nsc-pipeline__bar's overflow:hidden (needed for the Split
 * style's overlapping fill pieces).
 */
.nsc-pipeline__bar-wrap {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: var(--nsc-pl-bar-h);
}

/*
 * The reference design's gradient runs top-to-bottom (cyan top, blue
 * bottom) — not along the bar's length.
 */
.nsc-pipeline__bar {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: var(--nsc-pl-bar-radius);
	overflow: hidden;
}

.nsc-pipeline__bar--gradient {
	background: linear-gradient(180deg, var(--nsc-pl-bar-top) 0%, var(--nsc-pl-bar-bottom) 100%);
}

.nsc-pipeline__bar--solid {
	background: var(--nsc-pl-bar-solid);
}

/*
 * Split style: the solid and gradient stages are two fully independent,
 * fully-rounded pill-shaped .bar-wrap elements (each its own hover/focus
 * target, for its own tooltip) rather than one continuous two-toned bar —
 * Split Stage Gap (--nsc-pl-split-gap, see the render loop) keeps them
 * visibly apart so they read as two separate bars, not one.
 */

/*
 * A plain rotated square (no border-radius — the reference design's
 * diamonds have sharp corners), positioned directly against .row-track
 * (not nested inside a bar-wrap) via an inline `left: X%` matching its own
 * Milestone Date — translate(-50%, -50%) centers the square itself on that
 * point before the rotation, so the date it marks is the diamond's visual
 * center, not one of its corners. Diamond Nudge is an optional additional
 * px offset on top of that (0 by default — the date alone is normally
 * enough).
 *
 * z-index above the highest bar-wrap value (Split rows go up to 2, for
 * the gradient/end segment) — without an explicit value here the diamond
 * computes to z-index:auto, which stacks BELOW any sibling that has an
 * explicit z-index regardless of DOM order, so it could end up hidden
 * under the gradient segment's bar rather than sitting on top of it.
 */
.nsc-pipeline__diamond {
	position: absolute;
	top: 50%;
	z-index: 3;
	transform: translate(calc(-50% + var(--nsc-pl-diamond-nudge)), -50%) rotate(45deg);
	width: var(--nsc-pl-diamond);
	height: var(--nsc-pl-diamond);
	background-color: var(--nsc-pl-diamond-color);
}

/*
 * Bar/segment labels moved out of the bar itself and into a hover/focus
 * tooltip — narrow bars were truncating this text (or a milestone diamond
 * would sit on top of it), and the reference design doesn't actually
 * require the labels to be visible at all times. tabindex="0" on
 * .bar-wrap (added only when there's text to show) makes it reachable via
 * keyboard, so :focus below isn't just a mouse-only affordance.
 */
/*
 * --nsc-pl-tooltip-shift (pipeline-timeline.js) nudges this back into
 * view when it would otherwise render partly outside the chart/scroll
 * container — e.g. centered on a bar near the left or right edge. Left at
 * 0px, it's invisible: the transform is identical to a plain
 * translateX(-50%). The arrow below shifts the opposite amount so it
 * keeps pointing at the bar's true center even while the box itself has
 * moved.
 */
.nsc-pipeline__tooltip {
	--nsc-pl-tooltip-shift: 0px;
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(calc(-50% + var(--nsc-pl-tooltip-shift)));
	z-index: 2;
	min-width: max-content;
	max-width: 280px;
	background-color: #0A2A5E;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 10px 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.nsc-pipeline__tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: calc(50% - var(--nsc-pl-tooltip-shift));
	width: 10px;
	height: 10px;
	margin-left: -5px;
	margin-top: -5px;
	background-color: inherit;
	border-right: 1px solid rgba(255, 255, 255, 0.15);
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	transform: rotate(45deg);
}

.nsc-pipeline__tooltip .nsc-pipeline__bar-text {
	margin: 0;
	white-space: normal;
}

.nsc-pipeline__tooltip .nsc-pipeline__bar-text + .nsc-pipeline__bar-text {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.nsc-pipeline__bar-wrap:hover .nsc-pipeline__tooltip,
.nsc-pipeline__bar-wrap:focus .nsc-pipeline__tooltip,
.nsc-pipeline__bar-wrap:focus-within .nsc-pipeline__tooltip {
	opacity: 1;
	visibility: visible;
}

.nsc-pipeline__bar-wrap[tabindex] {
	cursor: help;
}

.nsc-pipeline__callouts-heading {
	margin: 32px 0 16px;
}

/*
 * A plain 3-column row, not positioned against the chart's own timeline
 * scale — an earlier version staggered each callout diagonally under its
 * own date via a spacer+track+margin-left layout mirroring the axis
 * above. Simpler, and reads as one flat set of highlights rather than
 * something tied to the exact bars above it.
 */
.nsc-pipeline__callouts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	row-gap: 10px;
	column-gap: 24px;
	margin-top: 32px;
}

.nsc-pipeline__callout {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nsc-pipeline__callout-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
}

.nsc-pipeline__callout-date {
	white-space: nowrap;
}

.nsc-pipeline__callout-detail {
	margin: 0;
	line-height: 1.4;
}

@media (max-width: 767px) {
	.nsc-pipeline__callouts {
		grid-template-columns: 1fr;
	}
}
