
/* ==========================================================================
   KD Lead Magnet Quiz: "Is It Time For Home Care?"
   The ONE place for quiz styling. Loaded on every front-end page by
   ../kd-lead-magnet-quiz.php (the popup is printed on every page).

   Covers
     1. Quiz popup           Popup Maker popup + Gravity Form 36
     2. Quiz section         Zion `.quiz-section` on the location pages
     3. Sticky CTA bar       "Wondering if it's Time for Home Care?" (location pages)
     4. Blog sidebar card    [kd_quiz_card] (Elementor single-post template)

   How the file is organised
     PART A  Design as approved by the client. Ported 1:1 from the old WPCode
             snippet "Lead Magnet Quiz Styling + Sticky CTA" and the three Zion
             page-level copies. Do not change values here without design sign-off.
             Selectors are scoped to the quiz with :where(), which adds zero
             specificity, so every rule keeps the exact cascade it had before.
     PART B  Fit and responsive layer (sizing, scrolling, small screens).
             Desktop at 1000px+ tall is visually identical to PART A.

   Hooks supplied by the PHP file
     .kd-quiz-popup       added to the popup overlay AND container (Popup Maker filter)
     .kd-quiz-cta         sticky bar
     .kd-quiz-card        blog card
     body.kd-has-quiz     the page contains the quiz section
   ========================================================================== */
:root {
	--kd-quiz-teal: #43bfd6;
	--kd-quiz-grey: #a2b5b9;
	--kd-quiz-blue: #509cd5;
	--kd-quiz-bg: #eff0f0;
	--kd-quiz-gutter: 20px;
}

/* ==========================================================================
   PART A.1  QUIZ POPUP (design as approved)
   ========================================================================== */

/* Popup shell */
.pum-container.kd-quiz-popup {
	box-shadow: none !important;
	border: none !important;
	border-radius: 15px !important;
	background-color: var(--kd-quiz-bg) !important;
	padding: 0 !important;
}

:where(.kd-quiz-popup) .pum-close.popmake-close {
	position: absolute !important;
}

/* Form furniture we hide on purpose */
:where(.kd-quiz-popup) .gform_heading, :where(.kd-quiz-popup) .gfield_required {
	display: none !important;
}

/* Left column: logo, step list, illustration */
:where(.kd-quiz-popup) .gf_page_steps:before, :where(.kd-quiz-popup) .gf_page_steps:after {
	content: "";
	position: static;
	display: block;
	top: 3rem;
	left: 3rem;
	background-repeat: no-repeat;
}

:where(.kd-quiz-popup) .gf_page_steps:before {
	/* Vector logo (media library: ohana-care-logo-coloured.svg). The box stays the
	   approved 280x60; contain keeps the artwork undistorted inside it. */
	background-image: url("https://cdn-liahf.nitrocdn.com/wzjYJysdSdDvOCgEUvkpGOYXDPTHrfsK/assets/images/optimized/rev-e13c7ea/ohanacare.ca/wp-content/uploads/ohana-care-logo-coloured.svg");
	background-size: contain;
	background-position: left center;
	width: 280px;
	height: 60px;
	margin-bottom: 6rem;
}

:where(.kd-quiz-popup) .gf_page_steps:after {
	background-image: url("https://cdn-liahf.nitrocdn.com/wzjYJysdSdDvOCgEUvkpGOYXDPTHrfsK/assets/images/optimized/rev-e13c7ea/ohanacare.ca/wp-content/uploads/ohana-senior-care.png");
	width: 100%;
	height: 206px;
	margin-top: 3rem;
}

:where(.kd-quiz-popup) .gf_page_steps {
	border-bottom-left-radius: 15px;
	border-top-left-radius: 15px;
	flex-direction: column;
	display: flex;
	background-color: #fff;
	padding: 3rem;
	margin-bottom: 0 !important;
}

@media (min-width: 991px) {
	:where(.kd-quiz-popup) .gf_page_steps {
		min-width: 385px;
	}
	
	:where(.kd-quiz-popup) .gform_wrapper form {
		display: flex;
	}
}

:where(.kd-quiz-popup) .gform_wrapper.gravity-theme .gf_step_label {
	font-size: 20.609px;
	line-height: 120%;
	font-weight: 600;
}

/* Step circles + connecting line */
:where(.kd-quiz-popup) .gf_step:last-of-type:before {
	content: none !important;
}

#gform_wrapper_36 .gf_step {
	position: relative;
	padding-bottom: 3rem;
	margin: 0 !important;
	display: flex;
	align-items: center;
	gap: 12px;
}

#gform_wrapper_36 .gf_step::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--kd-quiz-grey);
}

#gform_wrapper_36 .gf_step_completed::before {
	background: var(--kd-quiz-teal) !important;
}

#gform_wrapper_36 .gf_step_number {
	position: relative;
	background-color: #fff;
	width: 40px;
	height: 40px;
	min-width: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 0;
}

#gform_wrapper_36 .gf_step_number::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	background: var(--kd-quiz-grey);
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

#gform_wrapper_36 .gf_step_label {
	line-height: 1.4;
}

#gform_wrapper_36 .gf_step_completed .gf_step_number::after {
	content: none;
}

#gform_wrapper_36 .gf_step_completed .gf_step_number::before {
	content: "✓";
	position: absolute;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
}

:where(.kd-quiz-popup) .gform_wrapper.gravity-theme .gf_step_completed .gf_step_number::before {
	background-color: var(--kd-quiz-teal) !important;
	border-color: var(--kd-quiz-teal) !important;
}

:where(.kd-quiz-popup) .gf_step.gf_step_active .gf_step_number {
	background-color: var(--kd-quiz-teal) !important;
	border-color: var(--kd-quiz-teal) !important;
}

#gform_wrapper_36 .gf_step.gf_step_active .gf_step_number:after {
	content: none;
}

/* Right column: the questions */
.kd-quiz-popup .gform-body {
	padding: 3rem 1.5rem;
	display: flex;
	align-items: center;
}

@media (min-width: 768px) {
	.kd-quiz-popup .gform-body {
		padding: 3rem 6rem;
	}
}

.kd-quiz-popup .gform-body h2 {
	margin-top: 0;
}

:where(.kd-quiz-popup) .gsection_title {
	margin-top: 0;
	color: #000;
	font-family: Raleway;
	font-size: 16.938px;
	font-style: normal;
	font-weight: 500;
	line-height: 26.946px;
	letter-spacing: -.339px;
}

:where(.kd-quiz-popup) .gfield_label, :where(.kd-quiz-popup) .gsection {
	border-bottom: 0 !important;
}

:where(.kd-quiz-popup) .gfield_label {
	color: #1d2120 !important;
	font-family: Raleway !important;
	font-size: 23.082px !important;
	font-style: normal !important;
	font-weight: 600 !important;
	line-height: 34.645px !important;
	letter-spacing: .231px !important;
	text-transform: capitalize !important;
}

:where(.kd-quiz-popup) .gchoice .gform-field-label {
	color: #1d2120 !important;
	font-family: Raleway !important;
	font-size: 16.487px !important;
	font-style: normal !important;
	font-weight: 500 !important;
	line-height: 26.946px !important;
	letter-spacing: -.33px !important;
}

/* Answer choices: a card with a custom radio, per the example Wesley approved
   (white card, 1px light border, 4px corners; 22px radio with a #A2B5B9 ring; the
   chosen card gets a 2px teal border, a teal dot and a bold label). The whole card
   is the click target: the label stretches across it. */
:where(.kd-quiz-popup) .gchoice {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 52px;
	background-color: white;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 0;
	transition: border-color .15s ease, box-shadow .15s ease;
}

:where(.kd-quiz-popup) .gchoice:not(:last-of-type) {
	margin-bottom: .6rem;
}

.kd-quiz-popup .gchoice input.gfield-choice-input[type="radio"] {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 21px;
	width: 22px;
	height: 22px;
	margin: -11px 0 0;
	border: 2px solid var(--kd-quiz-grey);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.kd-quiz-popup .gchoice input.gfield-choice-input[type="radio"]:checked {
	background: radial-gradient(circle, var(--kd-quiz-teal) 0, var(--kd-quiz-teal) 7.5px, #fff 8px);
}

.kd-quiz-popup .gchoice input.gfield-choice-input[type="radio"]:focus-visible {
	outline: 2px solid var(--kd-quiz-teal);
	outline-offset: 2px;
}

/* The label fills the whole card (radio sits on top of its left padding), so a click
   anywhere on the card chooses the answer. Left padding = 21px + 22px radio + 11px gap. */
.kd-quiz-popup .gchoice .gform-field-label {
	flex: 1 1 auto;
	max-width: none !important;
	/* Gravity Forms caps it at calc(100% - 32px) with a stronger selector */
	margin: 0;
	padding: 12px 20px 12px 54px;
	cursor: pointer;
}

/* Chosen card: 2px teal border (1px border + 1px ring, so nothing shifts) and bold label. */
:where(.kd-quiz-popup) .gchoice:has(input:checked) {
	border-color: var(--kd-quiz-teal);
	box-shadow: 0 0 0 1px var(--kd-quiz-teal);
}

:where(.kd-quiz-popup) .gchoice:has(input:checked) .gform-field-label {
	font-weight: 700 !important;
}

/* Buttons */
:where(.kd-quiz-popup) .gform-page-footer {
	display: flex;
	justify-content: space-between;
}

:where(.kd-quiz-popup) .gform-theme-button {
	color: #f2f6fc !important;
	text-align: center !important;
	font-family: Raleway !important;
	font-size: 16.487px !important;
	font-style: normal !important;
	font-weight: 700 !important;
	line-height: 37.096px !important;
	border-radius: 5px !important;
	min-width: 154px !important;
	white-space: normal;
}

:where(.kd-quiz-popup) .gform-theme-button.gform_previous_button {
	color: #1d2120 !important;
	background-color: #cfd3d3 !important;
}

/* Anchors used by the sticky bar and Gravity Forms scroll-to-form */
#form, #gf_36, #eluid153af05a {
	scroll-margin-top: 120px;
}

/* ==========================================================================
   PART A.2  QUIZ SECTION on the location pages (Zion `.quiz-section`)
   ========================================================================== */
.quiz-section {
	color: #fff;
}

.quiz-section p {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.quiz-section .kl-title-block {
	padding-bottom: 0;
}

@media (max-width: 768px) {
	.quiz-section .kl-title-block {
		padding-top: 3rem;
	}
}

.quiz-section .znColumnElement-innerWrapper {
	outline: 1px solid white;
	outline-offset: -25px;
}

/* NOTE: targets one Zion element ID (Edmonton). Kept as approved. */
.quiz-section .znColumnElement-innerWrapper-eluid7660a86d {
	border-radius: 20px;
}

.quiz-section .blue-well {
	background-color: #3a71aa;
	border-radius: 10px;
	padding: 1.5rem 2rem;
	max-width: 710px;
	margin-left: auto;
	margin-right: auto;
}

.quiz-bulb-wrapper {
	position: absolute;
	top: -45px;
	left: 50%;
	transform: translateX(-50%);
}

/* "Begin the Assessment" button inside the section */
:where(.quiz-section) .popmake-14446 {
	background-color: white !important;
	color: var(--kd-quiz-blue) !important;
	text-transform: uppercase !important;
	font-weight: 700 !important;
	padding-top: 2rem !important;
	padding-bottom: 2rem !important;
	font-size: 16px;
	font-family: "raleway", Helvetica, Arial, sans-serif;
	letter-spacing: 1px;
	padding-left: 20px;
	padding-right: 20px;
}

@media (min-width: 575.98px) {
	:where(.quiz-section) .popmake-14446 {
		min-width: 297px !important;
	}
}

/* Carried over from the old snippet: spacing under the section on location pages.
   Scoped to pages that contain the quiz section, as the snippet was. */
body.kd-has-quiz .kd-accredited-services {
	margin-top: 30px !important;
}

/* ==========================================================================
   PART A.3  STICKY CTA BAR (location pages)
   ========================================================================== */
.kd-quiz-cta {
	position: fixed;
	top: 250px;
	z-index: 999999;
	left: 0;
}

@media (min-width: 768px) {
	.kd-quiz-cta {
		left: 50px;
	}
}

.kd-quiz-cta p {
	margin: 0;
	padding: 0;
}

.kd-quiz-cta a {
	color: #fff;
	text-transform: uppercase;
	font-size: 10px;
	font-weight: 800;
	font-family: "Raleway", sans-serif;
	display: flex;
	align-items: center;
	gap: 15px;
	padding: .5rem 1rem;
	border: 1px solid #fff;
	background-color: var(--kd-quiz-teal);
	box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23);
}

@media (min-width: 768px) {
	.kd-quiz-cta a {
		font-size: 16px;
	}
}

.kd-quiz-cta a:hover {
	color: #fff;
}

/* Smooth jump from the bar to the quiz section (#form). Most location pages used
   to get this by accident from Elementor's stylesheet, which only loads on pages
   Elementor has touched (Edmonton had none, so it jumped instantly). Declared here
   so every page with the quiz section behaves the same. Visitors who ask their
   system to reduce motion still get an instant jump. */
@media (prefers-reduced-motion: no-preference) {
	html:has(body.kd-has-quiz) {
		scroll-behavior: smooth;
	}
}

/* ==========================================================================
   PART A.4  BLOG SIDEBAR CARD  [kd_quiz_card]
   Matches the Recent Posts cards in the same column (10px radius, Raleway).
   ========================================================================== */
.kd-quiz-card {
	background: linear-gradient(135deg, #2f7dba 0%, #509cd5 100%);
	border-radius: 10px;
	padding: 2.5rem 2.5rem 2.25rem;
	color: #fff;
	font-family: Raleway, sans-serif;
	box-shadow: 0 6px 18px rgba(47, 125, 186, .25);
}

.kd-quiz-card .kd-quiz-card__icon {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 0 1.25rem;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #fff;
}

.kd-quiz-card .kd-quiz-card__title {
	margin: 0 0 .75rem;
	color: #fff;
	font-family: Raleway, sans-serif;
	font-size: 2.4rem;
	font-weight: 500;
	line-height: 1.15;
	text-transform: none;
}

.kd-quiz-card .kd-quiz-card__text {
	margin: 0 0 1.5rem;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1.45;
}

.kd-quiz-card a.kd-quiz-card__btn {
	display: inline-block;
	padding: .9rem 1.8rem;
	background: #fff;
	border-radius: 50px;
	color: #2f7dba !important;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: .3s ease;
}

.kd-quiz-card a.kd-quiz-card__btn:hover, .kd-quiz-card a.kd-quiz-card__btn:focus {
	background: #eaf4fb;
	color: #1f5f92 !important;
}

.kd-quiz-card .kd-quiz-card__note {
	margin: 1.25rem 0 0;
	color: #fff;
	font-size: 1.2rem;
	font-style: italic;
	opacity: .9;
}

/* Blog sidebar (desktop): the card sits LAST, below Search, Recent Posts, Topics
   and Subscribe, and follows the reader once it scrolls up to the header.
   Only the card is sticky. The sidebar column is left as a normal full-height
   column (it stretches to the height of the post), and that height is the
   distance the card can travel. Nothing is capped or scrolls inside itself.
   The column and widget are found by what they contain, so there is no class to
   set in Elementor, and `order` puts the card last wherever it sits in the
   template. */
.elementor-column:has(> .elementor-widget-wrap > .elementor-widget .kd-quiz-card) > .elementor-widget-wrap > .elementor-widget:has(.kd-quiz-card) {
	order: 99;
	position: sticky;
	top: 120px;
	z-index: 2;
	margin-top: 2rem;
	margin-bottom: 0;
}

/* The column's default 30px inner padding pushed the first sidebar widget below
   the top edge of the white post box. Drop the top padding so the two edges line up. */
.elementor-column:has(> .elementor-widget-wrap > .elementor-widget .kd-quiz-card) > .elementor-widget-wrap {
	padding-top: 0;
}

.kd-quiz-card {
	margin-bottom: 0;
}

/* The theme sets #page_wrapper{overflow:hidden}, which disables position:sticky.
   clip crops the same way without creating a scroll container. Only on pages
   that have the card. */
@supports (overflow: clip) {
	body:has(.kd-quiz-card) #page_wrapper {
		overflow: clip;
	}
}

@media (max-width: 1024px) {
	/* Stacked under the post on tablet/phone: no sticky, and the card goes back to
	   the top of the sidebar so the call to action is not buried under Search,
	   Recent Posts, Topics and Subscribe. */
	.elementor-column:has(> .elementor-widget-wrap > .elementor-widget .kd-quiz-card) > .elementor-widget-wrap > .elementor-widget:has(.kd-quiz-card) {
		order: 0;
		position: static;
		margin-top: 0;
		margin-bottom: 2rem;
	}
	
	/* Restore the normal inner padding. */
	.elementor-column:has(> .elementor-widget-wrap > .elementor-widget .kd-quiz-card) > .elementor-widget-wrap {
		padding-top: 30px;
	}
}

/* ==========================================================================
   PART B  FIT + RESPONSIVE LAYER (popup)
   Goals: the popup is never taller or wider than the screen, the close button
   is always reachable, the layout does not jump between steps, and phones get a
   compact header instead of a 1,600px tall step list.
   Nothing in here changes colours, type, or components.
   ========================================================================== */

/* B.1  Positioning. Popup Maker centres the box with JS-written inline styles
   that drift between steps. Centre it with CSS instead (!important beats the
   inline values), and let the popup scroll inside itself, not the page. */

/* The second selector keeps this layout while the overlay fades out. Popup Maker
   removes .pum-active at the START of that fade but leaves inline display:block until
   it ends, so without it the box would jump out of position mid-fade. */
.pum-overlay.kd-quiz-popup.pum-active, .pum-overlay.kd-quiz-popup[style*="display: block"] {
	display: flex !important;
	align-items: flex-start;
	justify-content: center;
	padding: var(--kd-quiz-gutter) 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.pum-container.kd-quiz-popup {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	transform: none !important;
	margin: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	width: 80% !important;
	flex-direction: column;
	max-height: calc(100vh - ( var(--kd-quiz-gutter) * 2 ));
	max-height: calc(100dvh - ( var(--kd-quiz-gutter) * 2 ));
}

/* Forced to flex only while Popup Maker is showing it. When its fade-out ends, Popup
   Maker sets inline display:none; a blanket display:flex !important overrode that and
   made the box snap back to full opacity for the rest of the overlay fade (the "flash"
   on close). */
.pum-container.kd-quiz-popup:not([style*="display: none"]) {
	display: flex !important;
}

.kd-quiz-popup .pum-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.kd-quiz-popup .gform_wrapper {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
}

.kd-quiz-popup .gform_wrapper form {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}

/* Left column: fixed width so it no longer widens on the last step. */
.kd-quiz-popup .gf_page_steps {
	flex: 0 0 auto;
}

/* Inside it: logo and steps keep their size; the illustration is the one piece that
   gives way when the popup is short. At full height it is exactly the approved size. */
.kd-quiz-popup .gf_page_steps:before, .kd-quiz-popup .gf_step {
	flex: 0 0 auto;
}

.kd-quiz-popup .gf_page_steps:after {
	flex: 0 1 206px;
	min-height: 0;
	background-size: auto 100%;
	background-position: left top;
}

/* Right column scrolls inside the popup. Auto margins centre a short page
   (the intro) and fall back to top-aligned when the page is taller, so the
   first line is never cut off. */
.kd-quiz-popup .gform-body {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	overflow-y: auto;
	align-items: flex-start;
	overscroll-behavior: contain;
	border-radius: 0 15px 15px 0;
}

.kd-quiz-popup .gform-body > .gform_page {
	margin-block: auto;
	min-width: 0;
}

/* B.2  Wide desktop (1200px and up): the approved layout. */
@media (min-width: 1200px) {
	.kd-quiz-popup .gf_page_steps {
		flex-basis: 385px;
		width: 385px;
	}
}

/* B.3  Small desktop / landscape tablet (992 to 1199px): narrower step column,
   less side padding, so the questions keep a comfortable width. */
@media (min-width: 992px) and (max-width: 1199.98px) {
	.pum-container.kd-quiz-popup {
		width: 92% !important;
	}
	
	.kd-quiz-popup .gf_page_steps {
		min-width: 0;
		flex-basis: 310px;
		width: 310px;
		padding: 2.4rem;
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:before {
		width: 100%;
		background-size: contain;
		margin-bottom: 4rem;
	}
	
	.kd-quiz-popup .gf_page_steps:after {
		background-size: contain;
	}
	
	.kd-quiz-popup .gform-body {
		padding: 3rem 4rem;
	}
	
	:where(.kd-quiz-popup) .gform_wrapper.gravity-theme .gf_step_label {
		font-size: 18px;
	}
}

/* B.4  Short desktop screens (laptops): compress the step column's vertical
   spacing so the whole popup fits. The illustration stays and scales down with
   the available height (never cropped, never hidden). Above 1000px tall nothing
   changes. */
@media (min-width: 992px) and (max-height: 999.98px) {
	.kd-quiz-popup .gf_page_steps {
		padding-top: clamp(16px, 3vh, 30px);
		padding-bottom: clamp(16px, 3vh, 30px);
		overflow-y: auto;
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:before {
		margin-bottom: clamp(12px, calc(( 100vh - 640px ) / 6), 60px);
	}
	
	#gform_wrapper_36 .gf_step {
		padding-bottom: clamp(8px, calc(( 100vh - 620px ) / 12), 30px);
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:after {
		margin-top: clamp(8px, calc(( 100vh - 700px ) / 10), 30px);
	}
}

/* B.5  Tablet portrait and phones (under 992px): single column. The step list
   becomes a compact row of the same circles; the heading inside each page
   already names the step, so labels and the illustration are dropped. */
@media (max-width: 991.98px) {
	.pum-container.kd-quiz-popup {
		width: calc(100% - 32px) !important;
		max-width: 820px !important;
	}
	
	.pum-overlay.kd-quiz-popup.pum-active, .pum-overlay.kd-quiz-popup[style*="display: block"] {
		padding: 16px 0;
	}
	
	.pum-container.kd-quiz-popup {
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}
	
	.kd-quiz-popup .gform_wrapper form {
		flex-direction: column;
	}
	
	/* Logo on its own line, then the 7 circles evenly spread across the full width. */
	.kd-quiz-popup .gf_page_steps {
		display: grid;
		grid-template-columns: repeat(7, 1fr);
		align-items: center;
		row-gap: 14px;
		column-gap: 0;
		padding: 1.6rem 2rem;
		border-radius: 15px 15px 0 0;
		min-width: 0;
		width: auto;
		flex: 0 0 auto;
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:before {
		grid-column: 1/-1;
		width: 150px;
		height: 32px;
		margin-bottom: 0;
		background-size: contain;
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:after {
		display: none;
	}
	
	#gform_wrapper_36 .gf_step {
		padding-bottom: 0;
		gap: 0;
		justify-content: center;
	}
	
	#gform_wrapper_36 .gf_step_label {
		display: none;
	}
	
	/* Same circles, smaller. The connector now runs sideways from this circle's
	   centre to the next one's (it is the same pseudo-element as the vertical line). */
	#gform_wrapper_36 .gf_step_number {
		width: 28px;
		height: 28px;
		min-width: 28px;
	}
	
	#gform_wrapper_36 .gf_step_number::after {
		width: 9px;
		height: 9px;
	}
	
	/* Gravity Forms draws the completed (check) disk as a fixed 40px pseudo-element. */
	#gform_wrapper_36 .gf_step_completed .gf_step_number::before {
		font-size: 13px;
		width: 28px;
		height: 28px;
	}
	
	#gform_wrapper_36 .gf_step::before {
		left: 50%;
		right: auto;
		top: 50%;
		bottom: auto;
		width: 100%;
		height: 2px;
		transform: translateY(-50%);
	}
	
	.kd-quiz-popup .gform-body {
		border-radius: 0 0 15px 15px;
		padding: 2.4rem 1.6rem 3rem;
	}
}

@media (min-width: 576px) and (max-width: 991.98px) {
	.kd-quiz-popup .gform-body {
		padding: 3rem 4rem 4rem;
	}
}

/* B.6  Phones: let the buttons breathe and stack if they do not fit. */
@media (max-width: 575.98px) {
	:where(.kd-quiz-popup) .gform-page-footer {
		flex-wrap: wrap;
		gap: 1rem;
	}
	
	/* Gravity Forms adds margin-left/bottom to its buttons; drop it so each stacked
	   button is exactly the footer's width. The footer's gap does the spacing. */
	:where(.kd-quiz-popup) .gform-theme-button {
		flex: 1 1 100%;
		width: 100%;
		min-width: 0 !important;
		margin: 0 !important;
	}
	
	:where(.kd-quiz-popup) .gfield_label {
		font-size: 19px !important;
		line-height: 28px !important;
	}
	
	.kd-quiz-popup .gchoice input.gfield-choice-input[type="radio"] {
		left: 16px;
	}
	
	.kd-quiz-popup .gchoice .gform-field-label {
		padding: 12px 14px 12px 48px;
	}
}

/* B.7  Very short landscape phones: logo and circles share one slim row. */
@media (max-width: 991.98px) and (max-height: 480px) {
	.kd-quiz-popup .gf_page_steps {
		grid-template-columns: 130px repeat(7, 1fr);
		padding: 1rem 2rem;
		row-gap: 0;
	}
	
	:where(.kd-quiz-popup) .gf_page_steps:before {
		grid-column: 1/2;
		width: 120px;
		height: 26px;
	}
}

/* B.8  Reduced motion: no fade, no scroll animation. */
@media (prefers-reduced-motion: reduce) {
	.kd-quiz-card a.kd-quiz-card__btn {
		transition: none;
	}
}

/* ==========================================================================
   PART C  BLOG HERO BUTTON (under the "Written by" line)
   Added after the sidebar card, to make the assessment hard to miss on the
   post itself. NOT yet client-approved: treat as pending design sign-off.
   White pill with blue text, the same language as the sidebar card button,
   so it reads clearly on the dark photo overlay. Markup: append_hero_cta()
   in ../kd-lead-magnet-quiz.php.
   ========================================================================== */
.kd-quiz-hero {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.kd-quiz-hero a.kd-quiz-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 10px 14px 10px 10px;
	background: #fff;
	border-radius: 60px;
	color: #1f5f92 !important;
	font-family: Raleway, sans-serif;
	text-align: left;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 0 4px rgba(67, 191, 214, .6);
	transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}

.kd-quiz-hero a.kd-quiz-hero__btn:hover, .kd-quiz-hero a.kd-quiz-hero__btn:focus-visible {
	background: #eaf4fb;
	color: #1f5f92 !important;
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .4), 0 0 0 4px rgba(67, 191, 214, .9);
}

.kd-quiz-hero a.kd-quiz-hero__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 4px;
}

.kd-quiz-hero .kd-quiz-hero__icon {
	flex: none;
	display: block;
	width: 44px;
	height: 44px;
	border: 2px solid #43bfd6;
	border-radius: 50%;
	background: #fff;
}

.kd-quiz-hero .kd-quiz-hero__label {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.kd-quiz-hero .kd-quiz-hero__title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.1;
}

.kd-quiz-hero .kd-quiz-hero__sub {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.1;
	text-transform: uppercase;
}

.kd-quiz-hero .kd-quiz-hero__arrow {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-left: 4px;
	border-radius: 50%;
	background: #43bfd6;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	transition: transform .25s ease;
}

.kd-quiz-hero a.kd-quiz-hero__btn:hover .kd-quiz-hero__arrow {
	transform: translateX(3px);
}

/* A slow ring pulse draws the eye without moving the layout. */
@media (prefers-reduced-motion: no-preference) {
	.kd-quiz-hero a.kd-quiz-hero__btn:not(:hover):not(:focus-visible) {
		animation: kd-quiz-hero-pulse 2.8s ease-out infinite;
	}
}

@keyframes kd-quiz-hero-pulse {
	0% {
		box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 0 4px rgba(67, 191, 214, .6), 0 0 0 4px rgba(67, 191, 214, .5);
	}
	
	70% {
		box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 0 4px rgba(67, 191, 214, .6), 0 0 0 16px rgba(67, 191, 214, 0);
	}
	
	100% {
		box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 0 4px rgba(67, 191, 214, .6), 0 0 0 16px rgba(67, 191, 214, 0);
	}
}

@media (max-width: 600px) {
	.kd-quiz-hero {
		margin-top: 22px;
		padding: 0 16px;
	}
	
	.kd-quiz-hero a.kd-quiz-hero__btn {
		gap: 12px;
		max-width: 100%;
	}
	
	.kd-quiz-hero .kd-quiz-hero__title {
		font-size: 17px;
	}
	
	.kd-quiz-hero .kd-quiz-hero__sub {
		font-size: 12px;
	}
}
