/* LDG Resource Library — single resource layout (templates/single.php).
   Brand colours come from the site's Elementor global kit when present,
   with LDG's values as fallbacks. */

.ldg-rl-single {
	--ldg-accent: var(--e-global-color-primary, #ff3500);
	--ldg-ink: #141414;
	--ldg-text: #333;
	--ldg-muted: #6b6560;
	--ldg-line: #ece4d8;
	--ldg-card: #ffffff;
	--ldg-tint: #fdeee9;
	--ldg-cream: var(--e-global-color-a983356, #fffbf2);
	color: var(--ldg-text);
	font-size: 17px;
	line-height: 1.6;
}

/* Hello theme caps .site-main at 1140px; let the hero and "more" bands run
   full-bleed (inner content is constrained by .ldg-rl-wrap instead). */
body main.ldg-rl-single.site-main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}

.ldg-rl-single *,
.ldg-rl-single *::before,
.ldg-rl-single *::after {
	box-sizing: border-box;
}

.ldg-rl-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px;
}

.ldg-rl-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ldg-muted);
}

/* Hero */
.ldg-rl-hero {
	background:
		radial-gradient(circle at 92% 8%, rgba(255, 53, 0, 0.12), transparent 42%),
		linear-gradient(180deg, var(--ldg-tint) 0%, var(--ldg-cream) 100%);
	border-bottom: 1px solid var(--ldg-line);
	padding: 40px 0 48px;
	margin-bottom: 48px;
}

.ldg-rl-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--ldg-muted);
	margin-bottom: 28px;
}

.ldg-rl-crumbs a {
	color: var(--ldg-muted);
	text-decoration: none;
}

.ldg-rl-crumbs a:hover {
	color: var(--ldg-accent);
}

.ldg-rl-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ldg-accent);
}

.ldg-rl-eyebrow-code {
	color: var(--ldg-ink);
	background: #fff;
	border: 1px solid var(--ldg-line);
	border-radius: 999px;
	padding: 3px 12px;
	letter-spacing: 0.08em;
}

.ldg-rl-single .ldg-rl-title {
	font-size: clamp(36px, 5.5vw, 64px);
	line-height: 1.04;
	letter-spacing: -0.5px;
	margin: 0 0 18px;
	max-width: 16ch;
}

.ldg-rl-lead {
	font-size: clamp(18px, 2vw, 22px);
	line-height: 1.5;
	color: var(--ldg-ink);
	max-width: 46ch;
	margin: 0 0 28px;
}

.ldg-rl-hero-kpi {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	max-width: 640px;
	background: #fff;
	border: 1px solid var(--ldg-line);
	border-left: 4px solid var(--ldg-accent);
	border-radius: 12px;
	padding: 14px 18px;
	color: var(--ldg-ink);
	font-weight: 600;
	box-shadow: 0 6px 20px rgba(60, 30, 10, 0.06);
}

/* Two-column layout */
.ldg-rl-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 48px;
	/* Stretch (not start) so the aside spans the article's height and its
	   sticky inner panel has room to travel. */
	align-items: stretch;
}

.ldg-rl-article {
	min-width: 0;
}

/* Section cards */
.ldg-rl-sec {
	background: var(--ldg-card);
	border: 1px solid var(--ldg-line);
	border-radius: 18px;
	padding: 28px 30px;
	margin-bottom: 20px;
	scroll-margin-top: 110px;
}

.ldg-rl-sec-head {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 12px;
}

.ldg-rl-sec-num {
	flex: none;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--ldg-accent);
}

.ldg-rl-single .ldg-rl-sec h2 {
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--ldg-ink);
	margin: 0;
	text-transform: none;
	letter-spacing: 0;
}

.ldg-rl-sec-body > :last-child {
	margin-bottom: 0;
}

.ldg-rl-sec-body p {
	margin: 0 0 12px;
}

.ldg-rl-sec-body ul,
.ldg-rl-sec-body ol {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}

.ldg-rl-sec-body li {
	position: relative;
	padding: 10px 0 10px 30px;
	border-top: 1px solid var(--ldg-line);
}

.ldg-rl-sec-body li:first-child {
	border-top: 0;
}

.ldg-rl-sec-body li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 18px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--ldg-accent);
}

.ldg-rl-sec-body strong {
	color: var(--ldg-ink);
}

/* Variant: callout ("Use when", triggers, objectives) */
.ldg-rl-sec--callout {
	background: var(--ldg-tint);
	border-color: transparent;
}

.ldg-rl-sec--callout .ldg-rl-sec-body {
	font-size: 19px;
	color: var(--ldg-ink);
}

/* Variant: timeline (message architecture, flows, roadmaps, journeys) */
.ldg-rl-sec--steps ul,
.ldg-rl-sec--steps ol {
	counter-reset: ldgstep;
	position: relative;
}

.ldg-rl-sec--steps ul::before,
.ldg-rl-sec--steps ol::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 22px;
	bottom: 22px;
	width: 2px;
	background: var(--ldg-line);
}

.ldg-rl-sec--steps li {
	counter-increment: ldgstep;
	padding: 12px 0 12px 50px;
	border-top: 0;
}

.ldg-rl-sec--steps li::before {
	content: counter(ldgstep);
	left: 0;
	top: 10px;
	width: 32px;
	height: 32px;
	border: 0;
	background: var(--ldg-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 32px;
	text-align: center;
	box-shadow: 0 0 0 5px #fff;
}

/* Variant: worksheet (message shells, field sets, scoring criteria) */
.ldg-rl-sec--worksheet .ldg-rl-sec-body {
	background: var(--ldg-cream);
	border: 1px dashed #d9cbb8;
	border-radius: 12px;
	padding: 16px 20px;
}

.ldg-rl-sec--worksheet li::before {
	border-radius: 3px;
	width: 12px;
	height: 12px;
	top: 17px;
}

/* Variant: KPI */
.ldg-rl-sec--kpi .ldg-rl-sec-body {
	font-size: 20px;
	font-weight: 600;
	color: var(--ldg-ink);
}

/* Variant: caution (suppressions, risks, exits) */
.ldg-rl-sec--caution {
	border-left: 4px solid var(--ldg-ink);
}

.ldg-rl-sec--caution li::before {
	border-radius: 2px;
	border-color: var(--ldg-ink);
	transform: rotate(45deg);
}

/* Variant: customize (the 20% to adapt) */
.ldg-rl-sec--customize {
	background: var(--ldg-ink);
	border-color: var(--ldg-ink);
	color: #e9e4dd;
}

.ldg-rl-single .ldg-rl-sec--customize h2,
.ldg-rl-sec--customize strong {
	color: #fff;
}

.ldg-rl-sec--customize .ldg-rl-sec-kicker {
	color: #b9b1a7;
	margin-bottom: 6px;
}

.ldg-rl-sec--customize li {
	border-color: rgba(255, 255, 255, 0.12);
}

/* Sidebar */
.ldg-rl-aside {
	min-width: 0;
}

.ldg-rl-aside-inner {
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Only jump links + CTA follow the reader; "At a glance" stays put. */
.ldg-rl-aside-sticky {
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ldg-rl-panel {
	background: var(--ldg-card);
	border: 1px solid var(--ldg-line);
	border-radius: 18px;
	padding: 22px;
}

.ldg-rl-single .ldg-rl-panel-title {
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ldg-muted);
	margin: 0 0 14px;
}

.ldg-rl-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 16px;
	margin: 0;
	font-size: 15px;
}

.ldg-rl-facts dt {
	color: var(--ldg-muted);
	margin: 0;
}

.ldg-rl-facts dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
	color: var(--ldg-ink);
}

/* Extra .ldg-rl-single to beat the Elementor kit's global link colour. */
.ldg-rl-single .ldg-rl-facts a,
.ldg-rl-single .ldg-rl-toc a {
	color: var(--ldg-ink);
	text-decoration: none;
}

.ldg-rl-single .ldg-rl-facts a:hover,
.ldg-rl-single .ldg-rl-toc a:hover {
	color: var(--ldg-accent);
}

.ldg-rl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--ldg-line);
}

.ldg-rl-single .ldg-rl-chips a {
	font-size: 13px;
	text-decoration: none;
	color: var(--ldg-ink);
	background: var(--ldg-cream);
	border: 1px solid var(--ldg-line);
	border-radius: 999px;
	padding: 4px 12px;
}

.ldg-rl-single .ldg-rl-chips a:hover {
	border-color: var(--ldg-accent);
	color: var(--ldg-accent);
}

.ldg-rl-toc ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: ldgtoc;
	font-size: 15px;
}

.ldg-rl-toc li {
	counter-increment: ldgtoc;
	display: flex;
	gap: 10px;
	padding: 5px 0;
}

.ldg-rl-toc li::before {
	content: counter(ldgtoc, decimal-leading-zero);
	color: var(--ldg-accent);
	font-size: 12px;
	font-weight: 700;
	padding-top: 3px;
}

.ldg-rl-cta {
	background: var(--ldg-accent);
	border-color: var(--ldg-accent);
	color: #fff;
}

.ldg-rl-single .ldg-rl-cta .ldg-rl-panel-title {
	color: #fff;
	font-size: 20px;
	letter-spacing: 0;
	text-transform: none;
}

.ldg-rl-cta p {
	font-size: 15px;
	margin: 0 0 18px;
}

.ldg-rl-btn {
	display: inline-block;
	background: #fff;
	color: var(--ldg-ink);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 60px;
	padding: 12px 26px;
	transition: transform 0.15s ease;
}

.ldg-rl-btn:hover {
	color: var(--ldg-ink);
	transform: translateY(-1px);
}

/* Prev / next */
.ldg-rl-pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 32px 0 0;
}

.ldg-rl-pager a {
	display: block;
	text-decoration: none;
	border: 1px solid var(--ldg-line);
	border-radius: 14px;
	padding: 16px 18px;
	transition: border-color 0.15s ease;
}

.ldg-rl-pager a:hover {
	border-color: var(--ldg-accent);
}

.ldg-rl-pager-next {
	grid-column: 2;
	text-align: right;
}

.ldg-rl-pager-title {
	display: block;
	margin-top: 4px;
	font-weight: 700;
	color: var(--ldg-ink);
}

/* More templates */
.ldg-rl-more {
	margin-top: 64px;
	padding: 56px 0 64px;
	background: var(--ldg-tint);
	border-top: 1px solid var(--ldg-line);
}

.ldg-rl-more-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 24px;
}

.ldg-rl-single .ldg-rl-more h2 {
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
}

.ldg-rl-single .ldg-rl-pager a,
.ldg-rl-single .ldg-rl-pager a:hover {
	color: inherit;
}

.ldg-rl-more-head a,
.ldg-rl-more-back a {
	color: var(--ldg-accent);
	font-weight: 600;
	text-decoration: none;
}

.ldg-rl-more .ldg-rl-portal {
	max-width: none;
}

/* Theme h3s are red uppercase; keep related-card titles readable. */
.ldg-rl-single .ldg-rl-more h3.ldg-rl-card-title {
	font-family: inherit;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ldg-ink);
}

.ldg-rl-single .ldg-rl-more .ldg-rl-card-type {
	color: var(--ldg-accent);
}

.ldg-rl-single .ldg-rl-more .ldg-rl-card-link {
	color: var(--ldg-accent);
}

.ldg-rl-more-back {
	margin: 28px 0 0;
}

@media (max-width: 960px) {
	.ldg-rl-layout {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.ldg-rl-aside-sticky {
		position: static;
	}
	.ldg-rl-toc {
		display: none;
	}
}

@media (max-width: 600px) {
	.ldg-rl-single {
		font-size: 16px;
	}
	.ldg-rl-hero {
		padding: 24px 0 32px;
		margin-bottom: 24px;
	}
	.ldg-rl-sec {
		padding: 22px 18px;
		border-radius: 14px;
	}
	.ldg-rl-pager {
		grid-template-columns: 1fr;
	}
	.ldg-rl-pager-next {
		grid-column: 1;
	}
	.ldg-rl-more-head {
		flex-direction: column;
	}
}
