/* =========================================================================
   RIBA-approved CPD: template-cpd.php.
   Scoped to .cp, mobile first, min-width queries at 640 / 768 / 900 / 1200.
   The house recipe from the 18 Sep 2026 spec (the common denominator of .sg,
   .wb, .su and .cr), renamed, plus the seminar rows, the "At a glance" facts
   and the link cards. The booking section is product.css's .pd-enquiry.
   ========================================================================= */

.cp {
	--cp-navy: #181d46;      /* Billi Blue */
	--cp-lightblue: #90cdeb; /* primary button on dark, accents */
	--cp-grey: #eaeaea;      /* borders, rules */
	--cp-band-grey: #f5f5f5;
	--cp-band-tint: #f1f5f5; /* Green Grey */
	--cp-text: #000;
	--cp-muted: #75757b;
	--cp-gutter: 20px;

	font-family: var(--font-din);
	color: var(--cp-text);
	line-height: 1.5;
}

@media (min-width: 900px) {
	.cp { --cp-gutter: 40px; }
}

.cp *,
.cp *::before,
.cp *::after { box-sizing: border-box; }

/* framework.css sets a global img { width: 100% }: width must be reset, not
   just max-width. */
.cp img { max-width: 100%; width: auto; height: auto; display: block; }

.cp-container {
	width: 100%;
	max-width: 1436px;
	margin: 0 auto;
	padding-left: var(--cp-gutter);
	padding-right: var(--cp-gutter);
}

/* ---- Sections ------------------------------------------------------------
   White, grey or tint bands; navy only mid-page, never the last section. */

.cp-section { padding: 48px 0; }

@media (min-width: 900px) {
	.cp-section { padding: 80px 0; }
}

.cp-section--grey { background: var(--cp-band-grey); }
.cp-section--tint { background: var(--cp-band-tint); }

/* Headings are real h2/h3 elements printed from plain-text fields. */
.cp .cp-section-heading {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	color: var(--cp-navy);
	text-transform: none;
	letter-spacing: normal;
}

.cp-section-intro {
	margin: 0;
	max-width: 66ch;
	font-size: 17px;
	line-height: 1.55;
	color: var(--cp-muted);
}

.cp-section-head { margin-bottom: 28px; }
.cp .cp-section-head > :last-child { margin-bottom: 0; }

@media (min-width: 900px) {
	.cp .cp-section-heading { font-size: 34px; }
	.cp-section-head { margin-bottom: 40px; }
}

/* WYSIWYG output. Base rules sit inside :where() so that band overrides win. */
:where(.cp) .cp-text > :first-child { margin-top: 0; }
:where(.cp) .cp-text > :last-child { margin-bottom: 0; }
:where(.cp) .cp-text p { margin: 0 0 0.85em; }
:where(.cp) .cp-text :is(h2, h3, h4) {
	margin: 1.4em 0 0.5em;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--cp-navy);
}
:where(.cp) .cp-text :is(ul, ol) { margin: 0 0 0.9em; padding-left: 1.15em; }
:where(.cp) .cp-text li { margin: 0 0 0.45em; }
:where(.cp) .cp-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Buttons ---------------------------------------------------------------
   desktop.css has a global a:hover { opacity: .7 }: every button opts out. */

/* 16px on a 1.5 line with 12px padding: 48px tall, the size the homepage,
   Why Billi, Specify Billi and the sector pages use. */
.cp .cp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: 2px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cp .cp-btn:hover,
.cp .cp-btn:focus-visible { opacity: 1; }

.cp .cp-btn--navy { background: var(--cp-navy); color: #fff; }
.cp .cp-btn--navy:hover,
.cp .cp-btn--navy:focus-visible { background: #fff; color: var(--cp-navy); box-shadow: inset 0 0 0 1px var(--cp-navy); }

.cp .cp-btn--light { background: var(--cp-lightblue); color: var(--cp-navy); }
.cp .cp-btn--light:hover,
.cp .cp-btn--light:focus-visible { background: #fff; color: var(--cp-navy); }

.cp .cp-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.cp .cp-btn--ghost:hover,
.cp .cp-btn--ghost:focus-visible { background: #fff; color: var(--cp-navy); box-shadow: none; }

.cp .cp-btn--outline { background: transparent; color: var(--cp-navy); box-shadow: inset 0 0 0 1px var(--cp-navy); }
.cp .cp-btn--outline:hover,
.cp .cp-btn--outline:focus-visible { background: var(--cp-navy); color: #fff; }

/* framework.css removes focus outlines sitewide. Navy on light
   (#90cdeb on white is 1.7:1), white on the hero. */
.cp :is(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--cp-navy); outline-offset: 3px; }
.cp .cp-hero :is(a, button, summary):focus-visible { outline-color: #fff; }

/* ---- Hero ------------------------------------------------------------------
   The title is an <h1>: typography.css gives it DM Serif Display at 400.
   Never set its font-weight or font-family (DM Serif has no bold). No
   photograph: the legacy banner was a navy "B" pattern 337px tall, and the
   RIBA roundel waits for Billi to confirm the membership mark. */

.cp-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	min-height: 340px;
	background: var(--cp-navy);
	color: #fff;
	overflow: hidden;
}

.cp-hero__inner { width: 100%; padding-top: 48px; padding-bottom: 48px; }
.cp-hero__content { max-width: 720px; }

.cp-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--cp-lightblue);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cp .cp-hero__title { margin: 0; color: #fff; font-size: 34px; line-height: 1.12; }

.cp-hero__intro {
	margin: 16px 0 0;
	max-width: 62ch;
	color: rgba(255, 255, 255, 0.9);
	font-size: 17px;
	line-height: 1.5;
}

.cp-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (min-width: 900px) {
	.cp-hero__inner { padding-top: 72px; padding-bottom: 72px; }
	.cp .cp-hero__title { font-size: 52px; }
	.cp-hero__intro { font-size: 18px; }
}

/* ---- Seminar rows ----------------------------------------------------------
   Picture and copy side by side, alternating. The photographs are 600x400,
   so they are held at their natural width rather than stretched to the
   column. */

.cp-seminar__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	align-items: center;
}

.cp-seminar__row > * { min-width: 0; }

.cp-seminar__media { display: flex; }

.cp .cp-seminar__img {
	width: 100%;
	max-width: min(600px, 100%);
	border-radius: 4px;
}

.cp-seminar__eyebrow {
	margin: 0 0 10px;
	color: var(--cp-navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cp .cp-seminar__title { font-size: 24px; margin-bottom: 16px; }

.cp-seminar__body .cp-text { font-size: 16px; line-height: 1.6; max-width: 64ch; }

.cp-seminar__list-heading {
	margin: 24px 0 12px;
	color: var(--cp-navy);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.cp-checklist {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cp-checklist li {
	position: relative;
	margin: 0;
	padding-left: 28px;
	font-size: 16px;
	line-height: 1.5;
}

/* The tick Specify Billi's CPD band uses: two borders, rotated. */
.cp-checklist li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.45em;
	width: 12px;
	height: 7px;
	border-left: 2px solid var(--cp-navy);
	border-bottom: 2px solid var(--cp-navy);
	transform: rotate(-45deg);
}

@media (min-width: 900px) {
	.cp-seminar__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
	.cp-seminar--flip .cp-seminar__media { order: 2; justify-content: flex-end; }
	.cp-seminar--text .cp-seminar__row { grid-template-columns: minmax(0, 1fr); }
	.cp .cp-seminar__title { font-size: 30px; }
}

/* ---- At a glance -------------------------------------------------------------- */

.cp-glance__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.cp-glance__inner > * { min-width: 0; }

.cp .cp-glance__heading { margin: 0; }

.cp-glance__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
}

.cp-glance__item {
	min-width: 0;
	padding: 20px 24px;
	border: 1px solid var(--cp-grey);
	border-radius: 4px;
	background: #fff;
}

.cp-glance__label {
	margin: 0 0 8px;
	color: var(--cp-muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cp-glance__value {
	margin: 0;
	color: var(--cp-navy);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.cp-glance__value + .cp-glance__value { margin-top: 4px; }

@media (min-width: 640px) {
	.cp-glance__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.cp-glance__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
}

/* ---- Booking (#cp-book) ------------------------------------------------------
   product.css's .pd-enquiry, unchanged apart from the aside's steps title,
   which is a <p> here rather than a div. */

.cp .pd-steps__title { margin: 0 0 16px; }

/* ---- Link cards (closing band) -------------------------------------------------
   Whole card clickable through one stretched link. The row layout matches
   Specify Billi's own "More for specifiers" cards. */

.cp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@media (min-width: 640px) {
	.cp-grid--2,
	.cp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.cp-grid { gap: 20px; }
	.cp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cp-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	padding: 18px 20px;
	border: 1px solid var(--cp-grey);
	border-radius: 4px;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cp-card--link:hover { border-color: var(--cp-navy); box-shadow: 0 6px 24px rgba(24, 29, 70, 0.08); }

.cp-card__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 2px;
	background: var(--cp-band-tint);
	color: var(--cp-navy);
}

.cp .cp-card__icon svg { display: block; width: 24px; height: 24px; }

.cp-card__body { flex: 1 1 auto; min-width: 0; }

.cp .cp-card__title {
	margin: 0;
	color: var(--cp-navy);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: normal;
}

/* desktop.css sets a { font-weight: 600 } and fades links on hover. */
.cp .cp-card__link { color: inherit; font-weight: inherit; text-decoration: none; }
.cp .cp-card__link::after { content: ''; position: absolute; inset: 0; border-radius: 4px; }
.cp .cp-card__link:hover { opacity: 1; }

/* The focus ring goes round the whole card, which is what the link covers. */
.cp .cp-card__link:focus-visible { outline: none; }
.cp .cp-card__link:focus-visible::after { outline: 2px solid var(--cp-navy); outline-offset: 3px; }

.cp-card__text {
	margin: 2px 0 0;
	color: var(--cp-muted);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
}

.cp-card__chevron {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--cp-navy);
	transition: transform 0.2s ease;
}

.cp-card--link:hover .cp-card__chevron { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.cp .cp-btn,
	.cp-card,
	.cp-card__chevron { transition: none; }
	.cp-card--link:hover .cp-card__chevron { transform: none; }
}
