/**
 * Career paths: the /paths/ hub and each /paths/<slug>/ page.
 *
 * Loaded only there (inc/paths.php), after the bundle. Nothing here is inside
 * .em-post-content, so the theme's prose list padding does not reach it; the
 * lists still reset their own padding in case a parent ever adds some.
 */

/* ---------- header ---------- */
.em-archive-hero .em-breadcrumb { margin-bottom: 1rem; }

.em-path-stats {
	margin: 1rem 0 0;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--em-primary);
}

.em-path-note {
	margin: 0.4rem 0 0;
	font-size: 0.8rem;
}

.em-path-start { margin: 1.25rem 0 0; }

/* Fill and lettering are separate tokens: dark mode's primary is light. */
.em-path-start__btn {
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--em-primary);
	border-radius: 0.5rem;
	background: var(--em-primary);
	color: var(--em-on-primary);
	font-weight: 700;
	text-decoration: none;
}

.em-path-start__btn:hover,
.em-path-start__btn:focus-visible {
	background: var(--em-primary-dark);
	border-color: var(--em-primary-dark);
	color: var(--em-on-primary);
}

/* ---------- progress ---------- */
.em-path-progress {
	display: inline-block;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	color: var(--em-muted);
}

.em-archive-hero > .em-container > .em-path-progress,
.em-path-card .em-path-progress { display: block; margin: 0.6rem 0 0; }

.em-path-progress[hidden] { display: none !important; }

.em-path-progress.is-done { color: var(--em-success); }

/* ---------- steps ---------- */
.em-path-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
	max-width: 52rem;
}

.em-path-step {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	gap: 0 1rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--em-border);
	border-radius: 0.6rem;
	background: var(--em-bg-card);
}

.em-path-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	background: var(--em-primary);
	color: var(--em-on-primary);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-weight: 700;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}

.em-path-step__body { min-width: 0; }

.em-path-step__title {
	margin: 0.25rem 0 0;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--em-text);
}

.em-path-step__line {
	margin: 0.35rem 0 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--em-muted);
}

.em-path-items {
	list-style: none;
	margin: 0.8rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}

.em-path-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	padding: 0;
	margin: 0;
}

.em-path-item__kind {
	flex: 0 0 6.5rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--em-muted);
}

.em-path-item__main {
	flex: 1 1 14rem;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.2rem 0.75rem;
}

/* The bundle gives bare links a fixed light blue in both themes. */
.em-path-item__link {
	color: var(--em-primary);
	font-weight: 600;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.em-path-item__link:hover,
.em-path-item__link:focus-visible { text-decoration: underline; }

.em-path-item__name {
	color: var(--em-text);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.em-path-item__meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.2rem 0.75rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	color: var(--em-muted);
}

.em-path-soon { color: var(--em-warning); font-weight: 600; }

@media (max-width: 480px) {
	.em-path-step { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
	.em-path-step__num { margin-bottom: 0.4rem; }
	.em-path-item__kind { flex-basis: 100%; }
}

/* ---------- other paths ---------- */
.em-path-others {
	margin: 2.5rem 0 0;
	max-width: 52rem;
}

.em-path-others__title {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
	color: var(--em-text);
}

.em-path-others__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
}

.em-path-others__list a,
.em-path-alt-link {
	color: var(--em-primary);
	font-weight: 600;
	text-underline-offset: 3px;
}

.em-path-others__list a:hover,
.em-path-others__list a:focus-visible,
.em-path-alt-link:hover,
.em-path-alt-link:focus-visible { text-decoration: underline; }

/* ---------- hub cards ---------- */
.em-path-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.em-path-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem 1.35rem;
	border: 1px solid var(--em-border);
	border-radius: 0.6rem;
	background: var(--em-bg-card);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.em-path-card:hover,
.em-path-card:focus-within {
	border-color: var(--em-primary);
	transform: translateY(-2px);
}

.em-path-card__name {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.em-path-card__name a {
	color: var(--em-text);
	text-decoration: none;
}

/* The whole card is the link's target, without nesting the other text in it. */
.em-path-card__name a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.em-path-card__desc {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--em-muted);
}

.em-path-card__stats {
	margin: auto 0 0;
	padding-top: 0.75rem;
	border-top: 1px solid var(--em-border);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	color: var(--em-primary);
}

.em-path-card__start {
	margin-top: 0.35rem;
	font-weight: 700;
	color: var(--em-primary);
}

@media (prefers-reduced-motion: reduce) {
	.em-path-card { transition: none; }
}
