/*
 * Roadmap page (/roadmap/). Mobile first: the base rules are the phone layout,
 * min-width queries widen it. Colours come from the theme tokens (--ms-*), so
 * light and dark mode follow the site switch.
 */

.rm {
	--rm-accent: var(--ms-green, #f97316);
	--rm-card: var(--ms-white, #fff);
	--rm-line: var(--ms-line, #e7e9e7);
	--rm-ink: var(--ms-ink, #222);
	--rm-body: var(--ms-body, #5c6560);
	--rm-muted: var(--ms-muted, #8b938e);
	--rm-soft: var(--ms-green-soft, #fff2e7);
	background: var(--ms-bg-2, #fbfcfb);
	color: var(--rm-body);
	padding-bottom: 56px;
	overflow-x: clip;
}

.rm-wrap {
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------------------------------------------------------------- Hero */

.rm-hero { padding: 16px 0 8px; }

.rm-hero__card {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border-radius: 28px;
	padding: 28px 20px 24px;
	color: #f7eee7;
	background:
		radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--rm-accent) 55%, transparent) 0%, transparent 55%),
		radial-gradient(90% 70% at 0% 100%, rgba(255, 61, 110, .28) 0%, transparent 60%),
		linear-gradient(160deg, #1a100a 0%, #0c0705 100%);
	box-shadow: 0 30px 70px -35px color-mix(in srgb, var(--rm-accent) 70%, #000);
}

.rm-hero__card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 236, 222, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 236, 222, .05) 1px, transparent 1px);
	background-size: 32px 32px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	        mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.rm-hero__orbit {
	position: absolute;
	z-index: -1;
	width: 300px;
	height: 300px;
	top: -110px;
	left: -110px;
	opacity: .55;
	animation: rm-spin 60s linear infinite;
}

.rm-hero__orbit circle { fill: none; stroke: rgba(255, 236, 222, .14); stroke-dasharray: 3 7; }
.rm-hero__orbit .rm-hero__dot {
	fill: var(--rm-accent);
	stroke: none;
	filter: drop-shadow(0 0 6px var(--rm-accent));
	animation: rm-pulse 3s ease-in-out infinite;
	animation-delay: calc(var(--i) * .5s);
}

@keyframes rm-spin { to { transform: rotate(360deg); } }
@keyframes rm-pulse { 50% { opacity: .35; } }

.rm-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	color: #ffd9bd;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 236, 222, .16);
	-webkit-backdrop-filter: blur(8px);
	        backdrop-filter: blur(8px);
}

.rm-hero__title {
	margin: 14px 0 10px;
	font-size: clamp(30px, 9vw, 54px);
	line-height: 1.25;
	font-weight: 900;
	letter-spacing: -.5px;
	color: #fff;
}

.rm-hero__title span {
	display: block;
	background: linear-gradient(90deg, #ffb27a, var(--rm-accent) 60%, #ff5d8f);
	-webkit-background-clip: text;
	        background-clip: text;
	color: transparent;
}

.rm-hero__lead {
	margin: 0;
	font-size: 15.5px;
	line-height: 2;
	color: #d8c5b7;
}

.rm-hero__stats {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.rm-hero__stats li {
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 236, 222, .1);
}

.rm-hero__stats b { display: block; font-size: 22px; font-weight: 900; color: #fff; line-height: 1.4; }
.rm-hero__stats span { font-size: 12.5px; color: #c2ad9e; }

.rm-hero__progress { margin-top: 18px; font-size: 13px; color: #ffd9bd; }
.rm-hero__progress-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 8px; }
.rm-hero__progress-bar i { display: block; height: 100%; width: calc(var(--p) * 1%); min-width: 6px; border-radius: 8px; background: linear-gradient(90deg, var(--rm-accent), #ffb27a); }

.rm-hero__cta { display: grid; gap: 10px; margin-top: 22px; }

.rm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 22px;
	border-radius: 16px;
	font-weight: 800;
	font-size: 15.5px;
	text-decoration: none;
	color: #1c0f06;
	background: linear-gradient(180deg, #ffa25c, var(--rm-accent));
	box-shadow: 0 12px 30px -12px var(--rm-accent), inset 0 1px 0 rgba(255, 255, 255, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}

/* The theme colours every link orange (also in dark mode); the buttons pin their own text colour. */
.rm a.rm-btn,
.rm a.rm-btn:hover,
.rm a.rm-btn:focus,
.rm a.rm-btn:visited { color: #1c0f06 !important; }
.rm-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--rm-accent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.rm-btn:active { transform: translateY(0); }
.rm-btn--ghost { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 236, 222, .2); }
.rm a.rm-btn--ghost,
.rm a.rm-btn--ghost:hover,
.rm a.rm-btn--ghost:focus,
.rm a.rm-btn--ghost:visited { color: #f7eee7 !important; }
.rm-btn--ghost:hover { background: rgba(255, 255, 255, .14); }

/* ---------------------------------------------------------- Stage pills */

.rm-nav { margin: 16px 0 6px; }

.rm-nav__list {
	list-style: none;
	margin: 0 -16px;
	padding: 4px 16px 10px;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.rm-nav__list::-webkit-scrollbar { display: none; }
.rm-nav__list li { flex: none; scroll-snap-align: start; }

.rm-nav__list a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px 8px 12px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	color: var(--rm-ink);
	background: var(--rm-card);
	border: 1px solid var(--rm-line);
}

.rm-nav__list a b {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 12px;
	color: #fff;
	background: var(--rm-accent);
}

.rm-nav__list a:hover { border-color: var(--rm-accent); color: var(--rm-accent); }

/* --------------------------------------------------------------- Steps */

.rm-steps {
	position: relative;
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
}

/* The path: a glowing line behind the nodes (right side in RTL). */
.rm-steps::before {
	content: "";
	position: absolute;
	top: 20px;
	bottom: 40px;
	right: 18px;
	width: 2px;
	border-radius: 2px;
	background: linear-gradient(180deg, var(--rm-accent), color-mix(in srgb, var(--rm-accent) 25%, transparent));
}

.rm-step {
	position: relative;
	display: grid;
	grid-template-columns: 38px 1fr;
	gap: 10px;
	margin-bottom: 18px;
	scroll-margin-top: 90px;
}

.rm-step__rail { display: flex; justify-content: center; }

.rm-step__node {
	position: sticky;
	top: 90px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	font-size: 16px;
	color: #fff;
	background: linear-gradient(145deg, #ffa25c, var(--rm-accent));
	box-shadow: 0 0 0 5px var(--ms-bg-2, #fbfcfb), 0 10px 24px -8px var(--rm-accent);
}

.rm-step__card {
	min-width: 0;
	padding: 16px 14px 14px;
	border-radius: 22px;
	background: var(--rm-card);
	border: 1px solid var(--rm-line);
	box-shadow: var(--ms-shadow-sm);
}

.rm-step__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rm-step__num { font-size: 12.5px; font-weight: 800; color: var(--rm-accent); }

.rm-step__when {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: var(--ms-green-ink, #c2410c);
	background: var(--rm-soft);
}

.rm-step__title { margin: 8px 0 6px; font-size: 21px; line-height: 1.5; font-weight: 900; color: var(--rm-ink); }
.rm-step__why { margin: 0; font-size: 14.5px; line-height: 2; }

.rm-skills { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.rm-skills li {
	padding: 4px 10px;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--rm-ink);
	background: var(--ms-bg, #f6f7f6);
	border: 1px solid var(--rm-line);
}

.rm-courses { display: grid; gap: 8px; margin-top: 16px; }

.rm-course {
	--c: var(--rm-accent);
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 16px;
	text-decoration: none;
	color: var(--rm-ink);
	background: var(--ms-bg, #f6f7f6);
	border: 1px solid var(--rm-line);
	transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

a.rm-course:hover { border-color: var(--c); transform: translateY(-1px); color: var(--rm-ink); }

.rm-course__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	font-size: 14px;
	color: #fff;
	background: var(--c);
}

.rm-course__body { flex: 1 1 calc(100% - 52px); min-width: 0; display: grid; gap: 2px; }
.rm-course__title { font-size: 15px; font-weight: 800; line-height: 1.6; }
.rm-course__meta { font-size: 12.5px; color: var(--rm-muted); }
.rm-course__bar { display: block; height: 5px; margin-top: 6px; border-radius: 5px; background: var(--rm-line); overflow: hidden; }
.rm-course__bar i { display: block; height: 100%; width: calc(var(--p) * 1%); min-width: 4px; background: var(--c); }

/* Phones: the badge sits under the title, aligned with it, so the title keeps the full width. */
.rm-badge {
	order: 3;
	margin-right: 52px;
	flex: none;
	padding: 4px 9px;
	border-radius: 8px;
	font-size: 11.5px;
	font-weight: 800;
	color: #0f7a3d;
	background: rgba(61, 220, 132, .16);
	white-space: nowrap;
}

.rm-badge--soon { color: var(--rm-muted); background: transparent; border: 1px dashed var(--rm-line); }
.rm-badge--done { color: #fff; background: #22a55a; }

.rm-course.is-soon { background: transparent; border-style: dashed; opacity: .85; }
.rm-course.is-soon .rm-course__icon { color: var(--rm-muted); background: var(--ms-bg, #f6f7f6); border: 1px dashed var(--rm-line); }

/* Destination */
.rm-step--goal .rm-step__node { background: linear-gradient(145deg, #3ddc84, #16a34a); box-shadow: 0 0 0 5px var(--ms-bg-2, #fbfcfb), 0 10px 24px -8px #22c55e; }

.rm-goal {
	padding: 22px 18px;
	border-radius: 22px;
	color: #f7eee7;
	background:
		radial-gradient(100% 90% at 100% 0%, color-mix(in srgb, var(--rm-accent) 45%, transparent), transparent 60%),
		linear-gradient(160deg, #1a100a, #0c0705);
}

.rm-goal h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.6; font-weight: 900; color: #fff; }
.rm-goal p { margin: 0 0 16px; font-size: 14.5px; line-height: 2; color: #d8c5b7; }
.rm-goal .rm-btn { width: 100%; }

/* ----------------------------------------------------------------- FAQ */

.rm-faq { margin-top: 26px; }
.rm-faq__title { margin: 0 0 12px; font-size: 20px; font-weight: 900; color: var(--rm-ink); }

.rm-faq details {
	margin-bottom: 8px;
	border-radius: 16px;
	background: var(--rm-card);
	border: 1px solid var(--rm-line);
}

.rm-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 16px;
	font-weight: 800;
	font-size: 15px;
	color: var(--rm-ink);
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.rm-faq summary::-webkit-details-marker { display: none; }
.rm-faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--rm-accent); transition: transform .2s ease; }
.rm-faq details[open] summary::after { transform: rotate(45deg); }
.rm-faq details p { margin: 0; padding: 0 16px 16px; font-size: 14.5px; line-height: 2; }

/* Cards slide in as they scroll into view, where the browser supports it. */
@supports (animation-timeline: view()) {
	.rm-step__card, .rm-goal {
		animation: rm-rise linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 40%;
	}
	@keyframes rm-rise { from { opacity: 0; transform: translateY(24px); } }
}

/* ------------------------------------------------------------ Wider screens */

@media (min-width: 640px) {
	.rm-hero { padding-top: 28px; }
	.rm-hero__card { padding: 44px 40px 36px; border-radius: 32px; }
	.rm-hero__orbit { width: 420px; height: 420px; top: -140px; left: -120px; }
	.rm-hero__lead { font-size: 17px; max-width: 620px; }
	.rm-hero__stats { grid-template-columns: repeat(4, 1fr); max-width: 640px; }
	.rm-hero__cta { display: flex; flex-wrap: wrap; }
	.rm-nav__list { flex-wrap: wrap; overflow: visible; margin: 0; padding: 4px 0 10px; }
	.rm-step { grid-template-columns: 56px 1fr; gap: 18px; }
	.rm-steps::before { right: 27px; }
	.rm-step__node { width: 56px; height: 56px; border-radius: 18px; font-size: 22px; }
	.rm-step__card { padding: 24px 24px 20px; }
	.rm-step__title { font-size: 24px; }
	.rm-courses { grid-template-columns: repeat(2, 1fr); }
	.rm-course { flex-wrap: nowrap; }
	.rm-course__body { flex: 1 1 auto; }
	.rm-badge { order: 0; margin-right: 0; }
	.rm-goal { padding: 30px 28px; }
	.rm-goal .rm-btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.rm-hero__orbit, .rm-hero__dot, .rm-step__card, .rm-goal { animation: none !important; }
}

/* ------------------------------------------------------- Path picker */

.rm-pick { margin-top: 20px; scroll-margin-top: 80px; }
.rm-pick__title { margin: 0 0 12px; font-size: 20px; font-weight: 900; color: var(--rm-ink); }
.rm-pick__grid { display: grid; gap: 10px; }

.rm-pick__card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	border-radius: 20px;
	text-decoration: none;
	background: var(--rm-card);
	border: 1.5px solid var(--rm-line);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.rm a.rm-pick__card, .rm a.rm-pick__card:hover, .rm a.rm-pick__card:visited { color: var(--rm-ink); }
.rm-pick__card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--rm-accent) 50%, var(--rm-line)); }

.rm-pick__card[aria-selected="true"] {
	border-color: var(--rm-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--rm-accent) 14%, transparent), 0 14px 30px -18px var(--rm-accent);
}

.rm-pick__card[aria-selected="true"]::after {
	content: "\2713";
	position: absolute;
	top: 12px;
	left: 12px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 900;
	color: #fff;
	background: var(--rm-accent);
}

.rm-pick__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	font-size: 19px;
	color: #fff;
	background: linear-gradient(145deg, #ffa25c, var(--rm-accent));
}

.rm-pick__body { min-width: 0; display: grid; gap: 4px; padding-left: 26px; }
.rm-pick__name { font-size: 16px; font-weight: 900; line-height: 1.6; }
.rm-pick__for { font-size: 13px; line-height: 1.85; color: var(--rm-body); }
.rm-pick__time { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ms-green-ink, #c2410c); }

/* ------------------------------------------------------------- A path */

.rm-tracks { margin-top: 18px; }
.rm-track { scroll-margin-top: 80px; margin-bottom: 26px; }
.rm-track[hidden] { display: none; }

.rm-track__head {
	position: relative;
	overflow: hidden;
	padding: 22px 18px 20px;
	border-radius: 24px;
	color: #d8c5b7;
	background:
		radial-gradient(110% 80% at 100% 0%, color-mix(in srgb, var(--rm-accent) 42%, transparent), transparent 58%),
		linear-gradient(160deg, #1a100a, #0c0705);
}

.rm-track__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 15px;
	font-size: 20px;
	color: #fff;
	background: linear-gradient(145deg, #ffa25c, var(--rm-accent));
	box-shadow: 0 10px 26px -10px var(--rm-accent);
}

.rm-track__kicker { display: block; margin-top: 14px; font-size: 12.5px; font-weight: 800; color: #ffb27a; }
.rm-track__title { margin: 2px 0 6px; font-size: 24px; line-height: 1.5; font-weight: 900; color: #fff; }
.rm-track__for { margin: 0; font-size: 14px; line-height: 1.9; }

.rm-track__outcome {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 236, 222, .12);
}

.rm-track__outcome b { display: block; font-size: 12.5px; color: #ffb27a; margin-bottom: 2px; }
.rm-track__outcome p { margin: 0; font-size: 14.5px; line-height: 2; color: #f1e3d8; }

.rm-track__facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.rm-track__facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	color: #f7eee7;
	background: rgba(255, 255, 255, .08);
}

.rm-track__head .rm-btn { width: 100%; margin-top: 16px; }

/* Steps inside a path: numbers in the nodes, optional steps quieter. */
.rm-track .rm-steps { margin-top: 16px; }
.rm-step__node { font-size: 16px; font-weight: 900; }
.rm-step.is-optional .rm-step__node { color: var(--rm-accent); background: var(--rm-card); box-shadow: 0 0 0 5px var(--ms-bg-2, #fbfcfb), inset 0 0 0 2px var(--rm-accent); }
.rm-step.is-optional .rm-step__card { border-style: dashed; }
.rm-step__title { margin: 0; }
.rm-step__why { margin-top: 4px; }

.rm-course--articles { --c: #7c3aed; }

@media (min-width: 640px) {
	.rm-pick__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.rm-pick__card { padding: 16px; }
	.rm-track__head { padding: 30px 28px 26px; }
	.rm-track__title { font-size: 28px; }
	.rm-track__head .rm-btn { width: auto; }
}

@media (min-width: 1100px) {
	.rm-wrap { max-width: 1040px; }
	.rm-pick__grid { grid-template-columns: repeat(4, 1fr); }
	.rm-pick__card { flex-direction: column; }
	.rm-pick__body { padding-left: 0; }
}

/* Course cards are links too: keep their title in the ink colour (the theme turns links orange). */
.rm a.rm-course,
.rm a.rm-course:hover,
.rm a.rm-course:visited { color: var(--rm-ink) !important; }
.rm a.rm-course:hover .rm-course__title { color: var(--c) !important; }

/* Coding level of a path. */
.rm-level {
	justify-self: start;
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 800;
	color: var(--ms-green-ink, #c2410c);
	background: var(--rm-soft);
}

@media (min-width: 1100px) {
	.rm-pick__grid { grid-template-columns: repeat(3, 1fr); }
}
