/* ==========================================================================
   Underdog — Progress Timeline
   Base styles only. Everything here is meant to be overridden by the
   Elementor Style tab, which outputs higher-specificity rules scoped to
   the element wrapper. Colours fall back to the portal theme variables
   when the widget sits inside the client portal.
   ========================================================================== */

.us-pt {
	--us-pt-ink: var(--ink, #17121f);
	--us-pt-ink-2: var(--ink-2, #4a4256);
	--us-pt-ink-3: var(--ink-3, #7c7489);
	--us-pt-line: var(--line, #e2dee9);
	--us-pt-card: var(--card, #ffffff);
	--us-pt-accent: var(--accent, #e8a33d);
	--us-pt-leaf: var(--leaf, #2f7d5e);
	--us-pt-hot: var(--hot, #c8256b);
	--us-pt-brand: var(--brand, #4c2a85);
	--us-pt-radius: var(--r, 14px);
	--us-pt-pad: var(--pad, 22px);
	--us-pt-mono: var(--f-mono, "JetBrains Mono", ui-monospace, "Courier New", monospace);
	--us-pt-display: var(--f-display, "Bricolage Grotesque", "Trebuchet MS", sans-serif);

	background: var(--us-pt-card);
	border: 1px solid var(--us-pt-line);
	border-radius: var(--us-pt-radius);
	padding: var(--us-pt-pad);
	box-shadow: 0 1px 2px rgba(23, 18, 31, .05), 0 8px 24px -12px rgba(23, 18, 31, .14);
	color: var(--us-pt-ink);
}

.us-pt *,
.us-pt *::before,
.us-pt *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Header — phase name on the left, completion figure on the right
   -------------------------------------------------------------------------- */
.us-pt .us-pt__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}

.us-pt--stacked .us-pt__head {
	flex-direction: column;
	align-items: flex-start;
}

.us-pt--meter-left .us-pt__head {
	flex-direction: row-reverse;
}

.us-pt .us-pt__head-main {
	min-width: 0;
}

.us-pt .us-pt__eyebrow {
	font-family: var(--us-pt-mono);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--us-pt-ink-3);
	margin: 0;
}

.us-pt .us-pt__title {
	font-family: var(--us-pt-display);
	font-weight: 700;
	font-size: 20px;
	letter-spacing: -.015em;
	line-height: 1.25;
	margin: 4px 0 0;
	color: var(--us-pt-ink);
}

/* --------------------------------------------------------------------------
   2. Completion figure
   -------------------------------------------------------------------------- */
.us-pt .us-pt__meter {
	text-align: right;
	flex: none;
}

.us-pt--stacked .us-pt__meter,
.us-pt--meter-left .us-pt__meter {
	text-align: left;
}

.us-pt .us-pt__pct {
	font-family: var(--us-pt-display);
	font-weight: 800;
	font-size: 32px;
	letter-spacing: -.03em;
	line-height: 1;
	margin: 0 0 4px;
	color: var(--us-pt-ink);
}

.us-pt .us-pt__pct-suffix {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.us-pt .us-pt__pct-label {
	font-family: var(--us-pt-mono);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--us-pt-ink-3);
	margin: 0;
}

/* --------------------------------------------------------------------------
   3. Phase rail
   -------------------------------------------------------------------------- */
.us-pt .us-pt__rail {
	display: flex;
	gap: 6px;
	margin: 16px 0 22px;
}

.us-pt .us-pt__phase {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
}

.us-pt .us-pt__phase-bar {
	height: 6px;
	border-radius: 100px;
	background: var(--us-pt-line);
	transform-origin: left center;
}

.us-pt .us-pt__phase.is-done .us-pt__phase-bar {
	background: var(--us-pt-leaf);
}

.us-pt .us-pt__phase.is-current .us-pt__phase-bar {
	background: var(--us-pt-accent);
}

.us-pt .us-pt__phase-label {
	font-family: var(--us-pt-mono);
	font-size: 9.5px;
	font-weight: 400;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--us-pt-ink-3);
	margin: 7px 0 0;
	line-height: 1.3;
}

.us-pt .us-pt__phase.is-current .us-pt__phase-label {
	color: var(--us-pt-ink);
	font-weight: 600;
}

.us-pt .us-pt__phase-num,
.us-pt .us-pt__phase-sep {
	font: inherit;
	color: inherit;
}

/* --------------------------------------------------------------------------
   4. Task columns
   -------------------------------------------------------------------------- */
.us-pt .us-pt__cols {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.us-pt .us-pt__col {
	min-width: 0;
}

.us-pt .us-pt__col-head {
	font-family: var(--us-pt-mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--us-pt-ink-3);
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--us-pt-line);
}

.us-pt .us-pt__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.us-pt .us-pt__item {
	font-size: 13px;
	line-height: 1.4;
	display: flex;
	gap: 8px;
	align-items: flex-start;
	color: var(--us-pt-ink);
}

.us-pt .us-pt__marker {
	flex: none;
	font-weight: 700;
	line-height: inherit;
	color: var(--us-pt-ink-3);
}

.us-pt .us-pt__item-text {
	min-width: 0;
}

/* Tone modifiers — colour comes from the Style tab, these are the defaults. */
.us-pt .us-pt__col--positive .us-pt__marker {
	color: var(--us-pt-leaf);
}

.us-pt .us-pt__col--warning .us-pt__marker {
	color: var(--us-pt-accent);
}

.us-pt .us-pt__col--danger .us-pt__marker {
	color: var(--us-pt-hot);
}

.us-pt .us-pt__col--brand .us-pt__marker {
	color: var(--us-pt-brand);
}

/* --------------------------------------------------------------------------
   5. Deadlines
   -------------------------------------------------------------------------- */
.us-pt .us-pt__deadlines {
	margin-top: 24px;
	border-top: 1px solid var(--us-pt-line);
	padding-top: 16px;
}

.us-pt .us-pt__deadlines-title {
	font-family: var(--us-pt-mono);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--us-pt-ink-3);
	margin: 0 0 6px;
}

.us-pt .us-pt__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-size: 13px;
	padding: 9px 0;
	border-bottom: 1px dashed var(--us-pt-line);
}

.us-pt .us-pt__row:last-child {
	border-bottom-style: none;
}

.us-pt .us-pt__row-label {
	min-width: 0;
	color: var(--us-pt-ink);
}

.us-pt .us-pt__row-date {
	flex: none;
	font-family: var(--us-pt-mono);
	font-size: 12px;
	letter-spacing: .01em;
	color: var(--us-pt-ink);
}

.us-pt .us-pt__row.is-highlight .us-pt__row-label,
.us-pt .us-pt__row.is-highlight .us-pt__row-date {
	color: var(--us-pt-hot);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Optional scroll animation
   -------------------------------------------------------------------------- */
.us-pt[data-animate="yes"] .us-pt__phase-bar {
	transform: scaleX(0);
	transition: transform .55s cubic-bezier(.22, .61, .36, 1);
	transition-delay: calc(var(--us-pt-i, 0) * 70ms);
}

.us-pt[data-animate="yes"].is-in .us-pt__phase-bar {
	transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   7. Responsive floor — the Style tab can override all of this per breakpoint
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
.us-pt .us-pt__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
.us-pt .us-pt__cols {
		grid-template-columns: 1fr;
	}

.us-pt .us-pt__rail {
		flex-wrap: wrap;
		row-gap: 14px;
	}

.us-pt .us-pt__phase {
		flex: 1 1 30%;
	}
}

@media (prefers-reduced-motion: reduce) {
.us-pt[data-animate="yes"] .us-pt__phase-bar {
		transform: none;
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   11. Subtitle and footer note
   -------------------------------------------------------------------------- */

.us-pt .us-pt__subtitle {
	font-size: 14px;
	line-height: 1.45;
	margin: 6px 0 0;
	color: var(--us-pt-ink-3);
}

.us-pt .us-pt__note {
	font-family: var(--us-pt-mono);
	font-size: 11px;
	letter-spacing: .06em;
	line-height: 1.5;
	margin: 18px 0 0;
	color: var(--us-pt-ink-3);
}

/* --------------------------------------------------------------------------
   12. Side column layout
   -------------------------------------------------------------------------- */

.us-pt--side {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 26px;
	align-items: start;
}

.us-pt--side-right {
	grid-template-columns: minmax(0, 1fr) 300px;
}

/* The aside is always first in the markup, so the layout reverses it rather
   than the render order. Keeps the reading order title, figure, then tasks. */
.us-pt--side-right .us-pt__aside {
	order: 2;
}

.us-pt .us-pt__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	min-width: 0;
}

.us-pt .us-pt__main {
	min-width: 0;
}

/* In a side column the meter is a block of its own, not a right-aligned
   figure in a header row. */
.us-pt--side .us-pt__meter {
	text-align: inherit;
}

.us-pt--side .us-pt__note {
	margin-top: 0;
}

/* The rail sits at the top of its own column, so it loses the header offset. */
.us-pt--side .us-pt__rail {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
   13. Completion ring
   -------------------------------------------------------------------------- */

.us-pt .us-pt__meter--ring {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
}

.us-pt .us-pt__ring {
	position: relative;
	width: 210px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	flex: none;
}

.us-pt .us-pt__ring-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.us-pt .us-pt__ring-fill {
	fill: transparent;
}

.us-pt .us-pt__ring-track {
	stroke: var(--us-pt-line);
	stroke-width: 12;
}

.us-pt .us-pt__ring-value {
	stroke: var(--us-pt-accent);
	stroke-width: 12;
	stroke-linecap: round;
	stroke-dashoffset: var(--us-pt-dash, 0);
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
}

/* Fallback for browsers without aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {

	.us-pt .us-pt__ring::before {
		content: "";
		display: block;
		padding-top: 100%;
	}

	.us-pt .us-pt__ring-svg {
		position: absolute;
		inset: 0;
	}
}

.us-pt .us-pt__ring-text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 18%;
}

.us-pt .us-pt__ring-text .us-pt__pct,
.us-pt .us-pt__ring-below .us-pt__pct {
	font-size: 44px;
	margin-bottom: 2px;
}

.us-pt .us-pt__ring-below {
	margin-top: 12px;
	text-align: center;
}

/* The ring fills from empty when the scroll animation is on. Same is-in class
   the phase bars use, so both reveal together. */
.us-pt[data-animate="yes"] .us-pt__ring-value {
	stroke-dashoffset: 314.159;
	transition: stroke-dashoffset .9s cubic-bezier(.22, .61, .36, 1);
}

.us-pt[data-animate="yes"].is-in .us-pt__ring-value {
	stroke-dashoffset: var(--us-pt-dash, 0);
}

@media (prefers-reduced-motion: reduce) {

	.us-pt[data-animate="yes"] .us-pt__ring-value {
		stroke-dashoffset: var(--us-pt-dash, 0);
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   14. Side layout stacks on tablet and below
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {

	.us-pt--side,
	.us-pt--side-left,
	.us-pt--side-right {
		grid-template-columns: minmax(0, 1fr);
	}

	.us-pt--side-right .us-pt__aside {
		order: 0;
	}

	.us-pt .us-pt__aside {
		align-items: flex-start;
	}

	.us-pt--side .us-pt__note {
		margin-top: 0;
	}
}

@media (max-width: 767px) {

	.us-pt .us-pt__ring {
		width: 180px;
	}

	.us-pt .us-pt__ring-text .us-pt__pct,
	.us-pt .us-pt__ring-below .us-pt__pct {
		font-size: 36px;
	}
}
