/*
 * Learning path pages: the single path (single-lp.html), the paths list
 * (archive-lp.html) and the single step (single-step.html).
 * Same visual language as the quiz pages: light hero, white cards,
 * navy titles, green chips, coral accents. Text colours meet WCAG AA.
 */
.lwn-lp-page {
	--lwnlp-navy: #143447;
	--lwnlp-coral: #e8475f;
	--lwnlp-coral-text: #e8475f;
	--lwnlp-green: #12b76a;
	--lwnlp-green-text: #027a48;
	--lwnlp-green-bg: #ecfdf3;
	--lwnlp-ghost: #f4f7fd;
	--lwnlp-line: #e4e9f2;
	--lwnlp-text: #475467;
	--lwnlp-muted: #667085;
	color: var(--lwnlp-text);
	background: #fff;
}

.lwn-lp-page *,
.lwn-lp-page *::before,
.lwn-lp-page *::after {
	box-sizing: border-box;
}

.lwn-lp-page .lwnlp-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Hero: text + start/continue button, and the roadmap card */
.lwn-lp-hero {
	background: var(--lwnlp-ghost);
	padding: 28px 16px 40px;
}
.lwnlp-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
}
.lwnlp-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
}
.lwnlp-crumbs li + li::before {
	content: '›';
	margin-inline-end: 4px;
	color: var(--lwnlp-muted);
}
.lwnlp-crumbs a {
	color: var(--lwnlp-muted);
	text-decoration: none;
}
.lwnlp-crumbs a:hover {
	color: var(--lwnlp-coral-text);
	text-decoration: underline;
}
.lwnlp-hero__eyebrow {
	margin: 14px 0 0;
	color: var(--lwnlp-green-text);
	font-size: 15px;
	font-weight: 700;
}
.lwnlp-hero__title {
	margin: 4px 0 8px;
	color: var(--lwnlp-navy);
	font-size: clamp(28px, 4.5vw, 42px);
	font-weight: 800;
	line-height: 1.3;
}
.lwnlp-hero__lead {
	margin: 0;
	max-width: 540px;
	font-size: 18px;
	line-height: 1.8;
}
.lwnlp-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	font-size: 15px;
	color: var(--lwnlp-navy);
}
.lwnlp-facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}
.lwnlp-facts svg {
	color: var(--lwnlp-muted);
}
.lwnlp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-top: 22px;
}
.lwnlp-hero__cta {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 10px 24px;
	border-radius: 12px;
	background: var(--lwnlp-coral-text);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s;
}
.lwnlp-hero__cta:hover {
	background: #b8203a;
	color: #fff;
}
.lwnlp-hero__note {
	font-size: 14px;
	color: var(--lwnlp-muted);
}

/* Roadmap card */
.lwnlp-road {
	padding: 20px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(20, 52, 71, 0.08);
}
.lwnlp-road__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}
.lwnlp-road__title {
	margin: 0 !important;
	color: var(--lwnlp-navy);
	font-size: 17px !important;
	font-weight: 700;
}
.lwnlp-road__pct {
	color: var(--lwnlp-green-text);
	font-weight: 700;
	font-size: 14px;
}
.lwnlp-road__list {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}
.lwnlp-road__list::before {
	content: '';
	position: absolute;
	top: 16px;
	bottom: 16px;
	inset-inline-start: 13px;
	width: 2px;
	background: var(--lwnlp-line);
}
.lwnlp-stop {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 6px 0;
}
.lwnlp-stop__dot {
	position: relative;
	z-index: 1;
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 2px solid var(--lwnlp-line);
	border-radius: 50%;
	background: #fff;
	color: var(--lwnlp-muted);
	font-size: 12px;
	font-weight: 700;
}
.lwnlp-stop.is-current .lwnlp-stop__dot {
	border-color: var(--lwnlp-coral);
	color: var(--lwnlp-coral-text);
}
.lwnlp-stop.is-done .lwnlp-stop__dot {
	border-color: var(--lwnlp-green);
	background: var(--lwnlp-green);
	color: #fff;
}
.lwnlp-stop--finish .lwnlp-stop__dot {
	border-style: dashed;
}
.lwnlp-stop--finish.is-done .lwnlp-stop__dot {
	border-style: solid;
	border-color: #f79009;
	background: #f79009;
	color: #fff;
}
.lwnlp-stop__body {
	flex: 1;
	min-width: 0;
}
.lwnlp-stop__name {
	display: block;
	color: var(--lwnlp-navy);
	font-weight: 500;
	text-decoration: none;
	line-height: 1.5;
}
a.lwnlp-stop__name:hover {
	color: var(--lwnlp-coral-text);
	text-decoration: underline;
}
.lwnlp-stop__meta {
	display: block;
	font-size: 13px;
	color: var(--lwnlp-muted);
}
a.lwnlp-stop__meta {
	color: var(--lwnlp-coral-text);
	font-weight: 500;
	text-decoration: none;
}
a.lwnlp-stop__meta:hover {
	text-decoration: underline;
}
.lwnlp-stop__bar {
	position: relative;
	display: block;
	max-width: 180px;
	height: 6px;
	margin-top: 4px;
	border-radius: 99px;
	background: var(--lwnlp-line);
	overflow: hidden;
}
.lwnlp-stop__bar i {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 0;
	border-radius: 99px;
	background: var(--lwnlp-green);
}
.lwnlp-hero__cta:focus-visible,
.lwnlp-stop a:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (max-width: 820px) {
	.lwnlp-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
}

/* No grey strip between the page and the footer (the footer's top gap). */
.lwn-lp-page + footer > .lwn-site-footer {
	margin-top: 0 !important;
}

/* Body */
.lwn-lp-body {
	padding: 32px 16px 72px;
}
.lwn-lp-body > * + * {
	margin-block-start: 24px !important;
}
.lwnlp-intro {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}
.lwnlp-card {
	padding: 18px 20px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 20px;
	background: #fff;
}
.lwnlp-card p {
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
}
.lwnlp-card__title {
	margin: 0 0 10px !important;
	color: var(--lwnlp-navy);
	font-size: 18px !important;
	font-weight: 700;
}
/* Only the block margins: the constrained layout centres it with auto inline margins. */
.lwn-lp-steps-title {
	margin-block-end: 0 !important;
	color: var(--lwnlp-navy);
	font-size: 22px !important;
	font-weight: 700;
}
.lwnlp-resources {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.lwnlp-resource {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 12px;
	color: var(--lwnlp-navy);
	font-size: 15px;
	text-decoration: none;
}
.lwnlp-resource:hover {
	border-color: var(--lwnlp-coral);
}
.lwnlp-resource:focus-visible,
.lwnlp-crumbs a:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
}
.lwnlp-resource__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
}
.lwnlp-resource__icon--video {
	background: #fdecef;
	color: var(--lwnlp-coral);
}
.lwnlp-resource__text small {
	display: block;
	font-size: 13px;
	color: var(--lwnlp-muted);
}

/* ---------- Paths list (archive-lp.html) ---------- */
.lwnlp-ahero .lwnlp-crumbs li[aria-current] {
	color: var(--lwnlp-navy);
}
.lwnlp-facts--big strong {
	font-weight: 800;
}

/* Ten-segment progress bar (filled by archive-lp.js) */
.lwnlp-pbar {
	display: flex;
	gap: 3px;
}
.lwnlp-pbar i {
	position: relative;
	flex: 1;
	height: 6px;
	border-radius: 99px;
	background: var(--lwnlp-line);
	overflow: hidden;
}
.lwnlp-pbar b {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 0;
	background: var(--lwnlp-green);
}

/* Continue learning */
.lwnlp-cont {
	padding: 18px 20px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 20px;
}
.lwnlp-cont[hidden] {
	display: none;
}
.lwnlp-cont__title,
.lwnlp-group__title {
	margin: 0 0 12px !important;
	color: var(--lwnlp-navy);
	font-size: 20px !important;
	font-weight: 700;
}
.lwnlp-cont__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}
.lwnlp-cont__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	text-decoration: none;
}
.lwnlp-cont__item:hover strong {
	color: var(--lwnlp-coral-text);
}
.lwnlp-cont__meta {
	font-size: 13px;
	color: var(--lwnlp-muted);
}
.lwnlp-cont__go {
	color: var(--lwnlp-coral-text);
	font-weight: 700;
	font-size: 14px;
}

/* Featured path */
.lwnlp-feat {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	padding: 28px;
	border-radius: 24px;
	background: var(--lwnlp-navy);
	color: #dbe4ee;
}
.lwnlp-feat p {
	margin: 0;
}
.lwnlp-feat__eyebrow {
	color: #6ce9a6;
	font-weight: 700;
	font-size: 15px;
}
.lwnlp-feat__title {
	margin: 4px 0 6px !important;
	color: #fff;
	font-size: clamp(24px, 3.5vw, 30px) !important;
	font-weight: 800;
	line-height: 1.35;
}
.lwnlp-feat__lead {
	font-size: 17px;
	line-height: 1.8;
}
.lwnlp-feat__meta {
	margin: 8px 0 18px !important;
	font-size: 14px;
	color: #b9c6d3;
}
.lwnlp-feat .lwnlp-hero__cta:focus-visible {
	outline-color: #fff;
}
.lwnlp-feat__road {
	list-style: none;
	margin: 0;
	padding: 0;
	border-inline-start: 2px solid rgba(255, 255, 255, 0.2);
}
.lwnlp-feat__road li {
	position: relative;
	margin: 0;
	padding: 6px 16px;
	font-size: 14px;
	color: #b9c6d3;
}
.lwnlp-feat__road li::before {
	content: '';
	position: absolute;
	inset-inline-start: -7px;
	top: 14px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #6ce9a6;
}
.lwnlp-feat__road strong {
	display: block;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
}

/* Level groups and path cards */
.lwnlp-group__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin-bottom: 4px;
}
.lwnlp-group__head span {
	color: var(--lwnlp-muted);
	font-size: 14px;
}
.lwnlp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}
.lwnlp-pcard {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 18px 20px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 20px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.lwnlp-pcard:hover,
.lwnlp-pcard:focus-within {
	border-color: #c9d3e3;
	box-shadow: 0 10px 26px rgba(20, 52, 71, 0.08);
}
.lwnlp-pcard__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.lwnlp-pcard__topic {
	color: var(--lwnlp-green-text);
	font-size: 13px;
	font-weight: 700;
}
.lwnlp-level {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	font-size: 12px;
	font-weight: 500;
}
.lwnlp-level--beginner {
	background: var(--lwnlp-green-bg);
	color: var(--lwnlp-green-text);
}
.lwnlp-level--advanced {
	background: #fdecef;
	color: #b42318;
}
.lwnlp-pcard__title {
	margin: 8px 0 4px !important;
	font-size: 19px !important;
	font-weight: 700;
	line-height: 1.45;
}
.lwnlp-pcard__title a {
	color: var(--lwnlp-navy);
	text-decoration: none;
}
/* The title link covers the whole card. */
.lwnlp-pcard__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 20px;
}
.lwnlp-pcard__title a:focus-visible {
	outline: none;
}
.lwnlp-pcard__title a:focus-visible::after {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
}
.lwnlp-pcard__text {
	flex: 1;
	margin: 0 0 14px !important;
	font-size: 15px;
	line-height: 1.8;
}
.lwnlp-pcard__progress {
	margin-bottom: 12px;
}
.lwnlp-pcard__progress[hidden] {
	display: none;
}
.lwnlp-pcard__foot {
	display: flex;
	align-items: center;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--lwnlp-line);
	font-size: 14px;
	color: var(--lwnlp-muted);
}
.lwnlp-pcard__go {
	margin-inline-start: auto;
	color: var(--lwnlp-coral-text);
	font-weight: 700;
}
.lwnlp-pcard.is-finished .lwnlp-pcard__go {
	color: var(--lwnlp-green-text);
}

@media (max-width: 760px) {
	.lwnlp-feat {
		grid-template-columns: minmax(0, 1fr);
		padding: 22px 20px;
	}
}

/* ---------- Single step (single-step.html) ---------- */
.lwnlp-lesson > * + * {
	margin-top: 18px;
}

/* Video: a picture until clicked, then the player */
.lwnlp-video {
	position: relative;
}
.lwnlp-video__play,
.lwnlp-video iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 18px;
}
.lwnlp-video__play {
	position: relative;
	padding: 0;
	overflow: hidden;
	background: #0f2a3a;
	cursor: pointer;
}
.lwnlp-video__play img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.lwnlp-video__play::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(15, 42, 58, 0.65));
}
.lwnlp-video__icon {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--lwnlp-coral-text);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	transform: translate(-50%, -50%);
	transition: transform 0.2s;
}
.lwnlp-video__play:hover .lwnlp-video__icon {
	transform: translate(-50%, -50%) scale(1.06);
}
.lwnlp-video__play:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 3px;
}
.lwnlp-video__cap {
	position: absolute;
	z-index: 1;
	bottom: 12px;
	inset-inline-start: 16px;
	inset-inline-end: 16px;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	text-align: start;
}
.lwnlp-video__yt {
	display: inline-block;
	margin-top: 8px;
	font-size: 14px;
	color: var(--lwnlp-muted);
}
.lwnlp-step-text {
	margin-top: 10px;
	font-size: 15px;
	line-height: 1.8;
}
.lwnlp-step-text p {
	margin: 0 0 10px;
}
/* Playlist (no single picture to show) */
.lwnlp-video__list {
	position: absolute;
	top: 16px;
	inset-inline-start: 16px;
	z-index: 1;
	padding: 2px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
}
/* Back to the path */
.lwnlp-backpath {
	display: block;
	padding: 14px 18px;
	border-radius: 16px;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	font-weight: 700;
	text-decoration: none;
	line-height: 1.5;
}
.lwnlp-backpath small {
	display: block;
	color: var(--lwnlp-muted);
	font-size: 13px;
	font-weight: 400;
}
.lwnlp-backpath:hover {
	color: var(--lwnlp-coral-text);
}
.lwnlp-backpath:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
}

/* Playlist (no single picture to show) */
.lwnlp-video__list {
	position: absolute;
	top: 16px;
	inset-inline-start: 16px;
	z-index: 1;
	padding: 2px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
}
/* Back to the path */
.lwnlp-backpath {
	display: block;
	padding: 14px 18px;
	border-radius: 16px;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	font-weight: 700;
	text-decoration: none;
	line-height: 1.5;
}
.lwnlp-backpath small {
	display: block;
	color: var(--lwnlp-muted);
	font-size: 13px;
	font-weight: 400;
}
.lwnlp-backpath:hover {
	color: var(--lwnlp-coral-text);
}
.lwnlp-backpath:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
}

/* Done button (same soft green as on the path page) */
.lwnlp-done-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin-top: 16px;
	padding: 6px 16px;
	border: 1px solid #a6f4c5;
	border-radius: 999px;
	background: var(--lwnlp-green-bg);
	color: var(--lwnlp-green-text);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}
.lwnlp-done-btn[hidden] {
	display: none;
}
.lwnlp-done-btn:hover {
	border-color: var(--lwnlp-green);
}
.lwnlp-done-btn.is-done {
	border-color: var(--lwnlp-green-text);
	background: var(--lwnlp-green-text);
	color: #fff;
}
.lwnlp-done-btn:focus-visible {
	outline: 3px solid var(--lwnlp-navy);
	outline-offset: 2px;
}

@media (max-width: 560px) {
	.lwnlp-video__icon {
		width: 56px;
		height: 56px;
	}
}

/* LWN CTA at the end of a path: light box, coral main button (CTA review, option A) */
.lwnlp-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 40px;
	padding: 24px;
	border: 1px solid #e3e8ef;
	border-radius: 16px;
	background: #f9fbfd;
	color: #143447;
}
.lwnlp-cta p { margin: 0; }
.lwnlp-cta form { margin: 0; }
.lwnlp-cta__title { font-size: 18px; font-weight: 700; }
.lwnlp-cta .lwnlp-cta__text { margin-top: 4px; font-size: 15px; color: #475467; }
.lwnlp-cta__btn {
	display: inline-block;
	padding: 12px 22px;
	border: 0;
	border-radius: 8px;
	background: #e8475f;
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.lwnlp-cta__btn:hover { filter: brightness(1.07); color: #fff; }
