/**
 * Revive Steps
 * Change the look with these variables, either here or on .rh-steps in your
 * theme's CSS (e.g. .rh-steps { --rhs-fill: #5d6b51; }).
 */
.rh-steps {
	--rhs-fill: var(--rh-color-deep, #5d6b51);        /* filled circle and line */
	--rhs-ring: var(--rh-color-sage, #a9b79a);        /* circle outline before it fills */
	--rhs-track: rgb(169 183 154 / 0.55);             /* faint line before it fills */
	--rhs-bg: var(--rh-color-whitewood, #f2ecdf);     /* inside the empty circles: match your section background */
	--rhs-number: var(--rh-color-eucalyptus, #6b7a5e); /* number before it fills */
	--rhs-number-on: var(--rh-color-cloud, #fbf8f2);  /* number once filled */
	--rhs-ink: var(--rh-color-ink, #2c2c2a);          /* text once reached */
	--rhs-title-ink: var(--rhs-ink);                  /* titles once reached */
	--rhs-muted: var(--rh-color-muted, #6e6a62);      /* text before it's reached */
	--rhs-dot: clamp(48px, 40px + 1.2vw, 56px);       /* circle size */
	--rhs-gap: clamp(16px, 2vw, 24px);                /* circle to text */
	--rhs-space: clamp(28px, 3vw, 40px);              /* between steps */
	--rhs-title-font: var(--rh-font-heading, "fraunces-variable", Georgia, serif);
	--rhs-title-size: clamp(21px, 18px + 0.7vw, 26px);
	--rhs-text-font: var(--rh-font-body, "neue-kabel", sans-serif);
	--rhs-text-size: inherit;                          /* same size as the page's normal text */
	--rhs-number-size: clamp(17px, 15px + 0.4vw, 20px);
	--rhs-fill-time: 1s;                               /* how long each circle takes to fill */
	--rhs-silk: cubic-bezier(0.45, 0.05, 0.25, 1);    /* slow start, long soft landing */

	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Track (faint) and fill line run from the first circle's centre to the last.
   The script adds them and sets their position. */
.rh-steps__track,
.rh-steps__fill {
	position: absolute;
	left: calc(var(--rhs-dot) / 2 - 1px);
	width: 2px;
	border-radius: 2px;
	pointer-events: none;
}
.rh-steps__track { background: var(--rhs-track); }
.rh-steps__fill {
	background: var(--rhs-fill);
	transform-origin: top;
	transform: scaleY(var(--progress, 0));
	will-change: transform;
}

.rh-step {
	position: relative;
	display: grid;
	grid-template-columns: var(--rhs-dot) minmax(0, 1fr);
	gap: 0 var(--rhs-gap);
	margin: 0;
	padding: 0 0 var(--rhs-space);
}
.rh-step:last-child { padding-bottom: 0; }
.rh-step::before, .rh-step::marker { content: none; } /* no list numbers from the theme */

.rh-step__dot {
	position: relative;
	z-index: 1;
	grid-row: 1 / span 2;
	display: grid;
	place-items: center;
	width: var(--rhs-dot);
	height: var(--rhs-dot);
	border-radius: 50%;
	background: var(--rhs-bg);
	box-shadow: inset 0 0 0 2px var(--rhs-ring);
	color: var(--rhs-number);
	font-family: var(--rhs-title-font);
	font-size: var(--rhs-number-size);
	font-variant-numeric: lining-nums tabular-nums;
	line-height: 1;
	transition: color var(--rhs-fill-time) var(--rhs-silk), box-shadow var(--rhs-fill-time) var(--rhs-silk);
}
.rh-step__dot > span { position: relative; z-index: 1; }
/* The colour blooms out from the centre */
.rh-step__dot::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--rhs-fill);
	opacity: 0;
	transform: scale(0.55);
	transition: opacity var(--rhs-fill-time) var(--rhs-silk), transform var(--rhs-fill-time) var(--rhs-silk);
}
/* Soft ring that ripples out once */
.rh-step__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	opacity: 0;
}

.rh-step__title {
	grid-column: 2;
	align-self: start;
	margin: 0;
	padding-top: calc(var(--rhs-dot) / 2 - 0.75em);
	color: var(--rhs-muted);
	font-family: var(--rhs-title-font);
	font-size: var(--rhs-title-size);
	font-weight: 400;
	line-height: 1.5;
	transition: color calc(var(--rhs-fill-time) + 0.3s) var(--rhs-silk);
}
.rh-step__text {
	grid-column: 2;
	margin: 4px 0 0;
	color: var(--rhs-muted);
	font-family: var(--rhs-text-font);
	font-size: var(--rhs-text-size);
	line-height: inherit;
	transition: color calc(var(--rhs-fill-time) + 0.5s) var(--rhs-silk) 0.1s;
}
.rh-step__text a { color: inherit; }

.rh-step.is-reached .rh-step__dot {
	box-shadow: inset 0 0 0 2px var(--rhs-fill);
	color: var(--rhs-number-on);
}
.rh-step.is-reached .rh-step__dot::before { opacity: 1; transform: none; }
.rh-step.is-reached .rh-step__dot::after { animation: rhs-ripple calc(var(--rhs-fill-time) + 0.7s) var(--rhs-silk) 0.2s; }
.rh-step.is-reached .rh-step__title { color: var(--rhs-title-ink); }
.rh-step.is-reached .rh-step__text { color: var(--rhs-ink); }

@keyframes rhs-ripple {
	0%   { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--rhs-fill) 22%, transparent); }
	100% { opacity: 0; box-shadow: 0 0 0 18px color-mix(in srgb, var(--rhs-fill) 0%, transparent); }
}

/* Before the script runs (or without it), show every step filled */
.rh-steps:not(.is-ready) .rh-step__dot { box-shadow: inset 0 0 0 2px var(--rhs-fill); color: var(--rhs-number-on); }
.rh-steps:not(.is-ready) .rh-step__dot::before { opacity: 1; transform: none; }
.rh-steps:not(.is-ready) .rh-step__title { color: var(--rhs-title-ink); }
.rh-steps:not(.is-ready) .rh-step__text { color: var(--rhs-ink); }

@media (prefers-reduced-motion: reduce) {
	.rh-step__dot, .rh-step__dot::before, .rh-step__title, .rh-step__text { transition: none; }
	.rh-step.is-reached .rh-step__dot::after { animation: none; }
}

@media print {
	.rh-steps__track, .rh-steps__fill { display: none; }
}
