/* ============================================================
   Leaf Design - article diagram styles
   Paste once into Appearance > Customize > Additional CSS.
   All rules are scoped under .lfd-diagram so nothing else is affected.
   Fonts (Overpass + Inter) are inherited from the theme.
   ============================================================ */
.lfd-diagram {
	--blue: #065DBD;
	--navy: #02254C;
	--pale: #ADD7F6;
	--muted: #EFF7FD;
	--gold: #FFF200;
	--ink: #02254C;
	--gray: #424450;
	--cardline: #E6F3FC;
	container-type: inline-size;
	margin: 60px 0;
	color: var(--ink);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lfd-diagram * {
	box-sizing: border-box;
}

/* component title */
.lfd-diagram .lfd-title {
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	letter-spacing: -0.5px;
	color: var(--blue);
	font-size: 1.75rem;
	text-align: center;
	margin: 0 0 20px;
	line-height: 1.2;
}

/* caption */
.lfd-diagram .lfd-cap {
	color: var(--navy);
	font-size: 13px;
	font-style: italic;
	line-height: 125%;
	text-align: center;
	margin-top: 20px;
	padding-top: 10px !important;
	border-top: dotted 1px var(--pale);
}

/* ---------- cards & panels ---------- */
.lfd-diagram .lfd-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lfd-diagram .lfd-card {
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
}

.lfd-diagram .lfd-head {
	margin: 0;
	padding: 13px 18px;
	color: #fff;
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.5px;
	line-height: 1.25;
}

.lfd-diagram .lfd-head--blue {
	background: var(--blue);
}

.lfd-diagram .lfd-head--navy {
	background: var(--navy);
}

.lfd-diagram .lfd-head--gold {
	background: var(--gold);
	color: var(--navy);
}

.lfd-diagram .lfd-points {
	list-style: none;
	margin: 0;
	padding: 12px 18px 16px;
}

.lfd-diagram .lfd-points li {
	position: relative;
	padding: 5px 0 10px 25px;
	line-height: 1.25;
	font-size: 16px;
}

.lfd-diagram .lfd-points.lfd-points--check li {
	padding-left: 30px;
}

.lfd-diagram .lfd-points.lfd-points--warn li {
	padding-left: 30px;
}

.lfd-diagram .lfd-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	width: 20px;
	height: 20px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.lfd-diagram .lfd-points--dot li::before {
	left: 5px;
	top: .72em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--pale);
}

.lfd-diagram .lfd-points--check li::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23065DBD'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.lfd-diagram .lfd-points--warn li::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23FFF200'/%3E%3Cpath d='M12 6v7M12 16.4v.6' fill='none' stroke='%2302254C' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- large icon tiles ---------- */
.lfd-diagram .lfd-tiles {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, 1fr);
}

.lfd-diagram .lfd-tiles--4 {
	grid-template-columns: repeat(4, 1fr);
}

.lfd-diagram .lfd-tile {
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
	padding: 26px 16px 22px;
	text-align: center;
}

.lfd-diagram .lfd-art {
	display: block;
	width: 46px;
	height: 46px;
	margin: 0 auto 14px;
	color: var(--navy);
}

.lfd-diagram .lfd-art svg {
	width: 100%;
	height: 100%;
	display: block;
}

.lfd-diagram .lfd-tile .lfd-label {
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.5px;
	color: var(--blue);
	line-height: 1.28;
}

/* ---------- list card (single or two column) ---------- */
.lfd-diagram .lfd-listcard {
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
	overflow: hidden;
}

.lfd-diagram .lfd-listbody {
	display: grid;
	gap: 2px 26px;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	padding: 14px 20px 18px;
}

.lfd-diagram .lfd-item {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 5px 0 10px 0;
	line-height: 1.25;
	font-size: 16px;
}

.lfd-diagram .lfd-item .lfd-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: .45em;
	border-radius: 50%;
	background: var(--pale);
}

.lfd-diagram .lfd-item .lfd-mark {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: -1px;
}

.lfd-diagram .lfd-num {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--blue);
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: .9rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- formula ---------- */
.lfd-diagram .lfd-formula {
	display: flex;
	gap: 10px;
	align-items: stretch;
	justify-content: center;
}

.lfd-diagram .lfd-fcard {
	flex: 1 1 0;
	min-width: 0;
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
	padding: 16px 12px;
	text-align: center;
}

.lfd-diagram .lfd-badge {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}

.lfd-diagram .lfd-badge--gold {
	background: var(--gold);
}

.lfd-diagram .lfd-fcard .lfd-ftitle {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	color: var(--navy);
	font-size: 1rem;
	margin: 8px 0 3px;
}

.lfd-diagram .lfd-fcard .lfd-fdesc {
	color: var(--gray);
	font-size: .85rem;
	line-height: 1.35;
}

.lfd-diagram .lfd-result {
	background: var(--navy);
	border: none;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.lfd-diagram .lfd-result .lfd-rtext {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.25;
	margin-top: 8px;
}

.lfd-diagram .lfd-hl {
	color: var(--gold);
}

.lfd-diagram .lfd-op {
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 1.6rem;
	color: var(--blue);
	flex: 0 0 auto;
}

/* ---------- buying committee ---------- */
.lfd-diagram .lfd-roles {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, 1fr);
}

.lfd-diagram .lfd-role {
	display: flex;
	align-items: center;
	gap: 12px;
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	padding: 14px 16px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
}

.lfd-diagram .lfd-role .lfd-rb {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.lfd-diagram .lfd-role .lfd-rname {
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--navy);
	line-height: 1.25;
}

.lfd-diagram .lfd-role--champ {
	background: var(--blue);
	border-color: var(--blue);
	grid-column: 1 / -1;
}

.lfd-diagram .lfd-role--champ .lfd-rb {
	background: var(--gold);
}

.lfd-diagram .lfd-role--champ .lfd-rname {
	color: #fff;
}

.lfd-diagram .lfd-role--champ .lfd-rsub {
	color: var(--pale);
	font-size: .85rem;
}

.lfd-diagram .lfd-arrow {
	display: block;
	margin: 14px auto 12px;
	width: 26px;
	height: 26px;
	color: var(--pale);
}

.lfd-diagram .lfd-decision {
	background: var(--navy);
	color: #fff;
	border-radius: 10px;
	padding: 18px 20px;
	text-align: center;
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.5px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
}

/* ---------- responsive (container queries: they respond to the
   width of the column the diagram sits in, not the viewport) ---------- */
@container (max-width:720px) {

	.lfd-diagram .lfd-tiles,
	.lfd-diagram .lfd-tiles--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@container (max-width:600px) {
	.lfd-diagram .lfd-formula {
		flex-direction: column;
	}

	.lfd-diagram .lfd-op {
		padding: 2px 0;
	}
}

@container (max-width:520px) {

	.lfd-diagram .lfd-points li,
	.lfd-diagram .lfd-item {
		font-size: 16px;
	}

	.lfd-diagram .lfd-roles {
		grid-template-columns: 1fr;
	}
}

@container (max-width:440px) {

	.lfd-diagram .lfd-tiles,
	.lfd-diagram .lfd-tiles--4 {
		grid-template-columns: 1fr;
	}
}

/* ---------- steps (vertical numbered sequence, with connector) ---------- */
.lfd-diagram .lfd-steps {
	list-style: none;
	margin: 0;
	padding: 18px 20px 20px;
}

.lfd-diagram .lfd-steps li {
	position: relative;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 0 0 16px 0;
}

.lfd-diagram .lfd-steps li:last-child {
	padding-bottom: 0;
}

.lfd-diagram .lfd-steps li::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 30px;
	bottom: 2px;
	width: 2px;
	background: var(--cardline);
}

.lfd-diagram .lfd-steps li:last-child::before {
	display: none;
}

.lfd-diagram .lfd-steps .lfd-snum {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--blue);
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 15px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.lfd-diagram .lfd-steps .lfd-stext {
	padding-top: 6px;
	font-size: 16px;
	line-height: 1.3;
}

/* ---------- flow (stages separated by arrows) ---------- */
.lfd-diagram .lfd-flow {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.lfd-diagram .lfd-stage {
	flex: 1 1 0;
	min-width: 0;
	background: linear-gradient(135deg, #FFFFFF 0, #EBF5FD 100%);
	border: 1px solid var(--cardline);
	border-radius: 10px;
	box-shadow: 0 3px 8px rgba(4, 7, 32, .08);
	padding: 18px 16px;
}

.lfd-diagram .lfd-stage .lfd-sname {
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.5px;
	color: var(--blue);
	margin: 0 0 10px;
	line-height: 1.2;
}

.lfd-diagram .lfd-stage ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lfd-diagram .lfd-stage li {
	position: relative;
	padding: 4px 0 6px 16px;
	font-size: 16px;
	line-height: 1.25;
}

.lfd-diagram .lfd-stage li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--pale);
}

.lfd-diagram .lfd-fnext {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pale);
}

.lfd-diagram .lfd-fnext svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* ---------- timeline (phases over time) ---------- */
.lfd-diagram .lfd-timeline {
	list-style: none;
	margin: 0;
	padding: 20px 20px 20px 10px;
}

.lfd-diagram .lfd-timeline li {
	position: relative;
	margin-left: 8px;
	padding: 0 0 22px 28px;
	border-left: 2px solid var(--cardline);
}

.lfd-diagram .lfd-timeline li:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}

.lfd-diagram .lfd-timeline li::before {
	content: "";
	position: absolute;
	left: -9px;
	top: 1px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--blue);
	border: 3px solid #fff;
	box-shadow: 0 0 0 1px var(--cardline);
}

.lfd-diagram .lfd-timeline .lfd-when {
	display: block;
	font-family: 'Overpass', sans-serif;
	font-weight: 600;
	font-size: 16px;
	letter-spacing: -0.5px;
	color: var(--blue);
	margin-bottom: 4px;
	line-height: 1.2;
}

.lfd-diagram .lfd-timeline .lfd-what {
	font-size: 16px;
	line-height: 1.3;
}

/* ---------- responsive for the new components ---------- */
@container (max-width:640px) {
	.lfd-diagram .lfd-flow {
		flex-direction: column;
	}

	.lfd-diagram .lfd-fnext {
		transform: rotate(90deg);
		padding: 2px 0;
	}
}
