/* BMD Customisations — policy pages (Terms, Privacy & Cookie, Refund, School Policy). */
.bmd-policy {
	--p-navy: #223167;
	--p-blue: #1c4385;
	--p-yellow: #fdc60f;
	--p-text: #3b4652;
	--p-muted: #6b7280;
	--p-line: #e4e9f2;
	--p-soft: #f4f6fb;
	font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--p-text);
}
.bmd-policy *, .bmd-policy *::before, .bmd-policy *::after { box-sizing: border-box; }

/* Let the policy use the full content box the theme gives it. */
body.bmd-policy-page .entry-content,
body.bmd-policy-page .page-content { max-width: none; }

/* ---------- Header ---------- */
.bmd-policy-hero {
	position: relative;
	overflow: hidden;
	margin: 0 0 40px;
	padding: 44px 40px 30px;
	border-radius: 16px;
	background: linear-gradient(135deg, #223167 0%, #1c4385 100%);
	color: #fff;
}
.bmd-policy-hero::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(253, 198, 15, .28) 0%, rgba(253, 198, 15, 0) 70%);
	pointer-events: none;
}
.bmd-policy-eyebrow {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(253, 198, 15, .18);
	color: var(--p-yellow);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.bmd-policy .bmd-policy-title {
	font-family: inherit !important;
	margin: 0 0 10px;
	color: #fff !important;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.15;
}
.bmd-policy-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0 0 26px !important;
	color: rgba(255, 255, 255, .78);
	font-size: 14px;
}
.bmd-policy-meta span + span::before { content: "•"; margin-right: 18px; opacity: .6; }
.bmd-policy-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.bmd-policy-tabs a {
	padding: 8px 16px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	color: #fff !important;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none !important;
	transition: background-color .15s, border-color .15s;
}
.bmd-policy-tabs a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.bmd-policy-tabs a.is-current { background: var(--p-yellow); border-color: var(--p-yellow); color: var(--p-navy) !important; font-weight: 600; }

/* ---------- Layout ---------- */
.bmd-policy-layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* Contents list */
.bmd-policy-toc { position: sticky; top: 110px; }
.bmd-policy-toc details { border-left: 2px solid var(--p-line); padding-left: 18px; }
.bmd-policy-toc summary {
	margin-bottom: 12px;
	color: var(--p-navy);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	list-style: none;
	cursor: default;
}
.bmd-policy-toc summary::-webkit-details-marker { display: none; }
.bmd-policy-toc ol { margin: 0 !important; padding: 0 !important; list-style: none !important; counter-reset: toc; }
.bmd-policy-toc li { margin: 0 !important; padding: 0 !important; counter-increment: toc; }
.bmd-policy-toc li::before { display: none !important; }
.bmd-policy-toc a {
	position: relative;
	display: block;
	padding: 6px 0;
	color: var(--p-muted) !important;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none !important;
	transition: color .15s;
}
.bmd-policy-toc a::before {
	content: counter(toc) ".";
	display: inline-block;
	min-width: 24px;
	color: #a3acbb;
	font-weight: 500;
}
.bmd-policy-toc a:hover { color: var(--p-navy) !important; }
.bmd-policy-toc a.is-active { color: var(--p-navy) !important; font-weight: 600; }
.bmd-policy-toc a.is-active::after {
	content: "";
	position: absolute;
	left: -20px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	background: var(--p-yellow);
}

/* ---------- Text ---------- */
.bmd-policy-body { max-width: 760px; font-size: 16px; line-height: 1.75; }
.bmd-policy-body > p:first-of-type { font-size: 18px; color: var(--p-navy); line-height: 1.65; }
.bmd-policy-body p { margin: 0 0 16px !important; }
.bmd-policy-body h2 {
	scroll-margin-top: 110px;
	margin: 44px 0 16px !important;
	padding-top: 32px;
	border-top: 1px solid var(--p-line);
	color: var(--p-navy) !important;
	font-family: inherit !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: 0 !important;
}
.bmd-policy-body > h2:first-child,
.bmd-policy-body > p:first-of-type + h2 { margin-top: 32px !important; }
.bmd-policy-body ul {
	margin: 0 0 20px !important;
	padding: 0 !important;
	list-style: none !important;
}
.bmd-policy-body ul li {
	position: relative;
	margin: 0 0 10px !important;
	padding: 0 0 0 26px !important;
}
.bmd-policy-body ul li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .72em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--p-yellow);
	box-shadow: 0 0 0 3px rgba(253, 198, 15, .2);
}
.bmd-policy-body strong { color: var(--p-navy); font-weight: 600; }
.bmd-policy-body a { color: var(--p-blue) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bmd-policy-body a:hover { color: var(--p-navy) !important; text-decoration-thickness: 2px; }
.bmd-policy .bmd-missing {
	padding: 1px 6px;
	border-radius: 4px;
	background: #fff4cc;
	color: #7a5a00;
	font-size: .92em;
}

/* Contact box at the end */
.bmd-policy-help {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 44px;
	padding: 24px 26px;
	border-radius: 14px;
	background: var(--p-soft);
	border: 1px solid var(--p-line);
}
.bmd-policy-help::before {
	content: "";
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--p-navy) no-repeat center / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fdc60f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
}
.bmd-policy-help strong { display: block; margin-bottom: 2px; color: var(--p-navy); font-size: 17px; }
.bmd-policy-help p { margin: 0 !important; color: var(--p-muted); }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
	.bmd-policy-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.bmd-policy-toc { position: static; margin-bottom: 8px; }
	.bmd-policy-toc details {
		border: 1px solid var(--p-line);
		border-radius: 12px;
		padding: 14px 18px;
		background: var(--p-soft);
	}
	.bmd-policy-toc summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
	.bmd-policy-toc summary::after { content: "+"; font-size: 20px; font-weight: 400; }
	.bmd-policy-toc details[open] summary { margin-bottom: 8px; }
	.bmd-policy-toc details[open] summary::after { content: "–"; }
	.bmd-policy-toc a.is-active::after { display: none; }
	.bmd-policy-body { max-width: none; }
}
@media (max-width: 600px) {
	.bmd-policy-hero { padding: 30px 22px 22px; border-radius: 12px; margin-bottom: 24px; }
	.bmd-policy-tabs a { padding: 7px 12px; font-size: 13px; }
	.bmd-policy-meta { flex-direction: column; gap: 2px; }
	.bmd-policy-meta span + span::before { display: none; }
	.bmd-policy-body { font-size: 15px; }
	.bmd-policy-body > p:first-of-type { font-size: 16px; }
	.bmd-policy-body h2 { font-size: 20px !important; margin-top: 32px !important; padding-top: 24px; }
	.bmd-policy-help { flex-direction: column; align-items: flex-start; }
}
