/*
 * HMCB Canvas — design fixes layered on top of canvas.css (loaded after it).
 * Kept separate so canvas.css can be replaced without losing these.
 */

/* ---------- Hero: smaller headline, fewer lines ---------- */
.hmcb-hero__title { max-width: 17ch; }

/* ---------- Outcome cards under the hero: read as statements, not buttons ---------- */
.hmcb-card.hmcb-outcome {
	background: transparent;
	border: 0;
	border-top: 2px solid var(--green-500);
	border-radius: 0;
	box-shadow: none;
	padding: 24px 0 0;
}
.hmcb-card.hmcb-outcome:hover,
html.hmcb-js .hmcb-outcome.hmcb-reveal.is-visible:hover {
	box-shadow: none;
	transform: none;
}
.hmcb-outcome p { font-size: 21px; }

/* ---------- Gap stats: readable source labels ---------- */
.hmcb-stat__label { color: var(--grey-600); }

/* ---------- Pillars on phones: show every panel view, stacked ---------- */
@media (max-width: 767px) {
	.hmcb-pillars__list > .kt-inside-inner-col {
		gap: 48px;
		padding-bottom: 40px;
	}
	.hmcb-pillar { min-height: 0; }
	.hmcb-panel {
		position: static;
		height: auto;
		overflow: visible;
		background: none;
		border-radius: 0;
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	.hmcb-panel__view {
		position: relative !important;
		inset: auto;
		opacity: 1 !important;
		border-radius: 24px;
		background: var(--surface-sunken);
	}
	.hmcb-panel__view.is-photo {
		height: 360px;
		overflow: hidden;
	}
}

/* ---------- Comparison table ---------- */
.hmcb-table thead th:nth-child(2) { color: var(--green-700); }
.hmcb-table th:nth-child(2),
.hmcb-table td:nth-child(2) {
	background: var(--green-50);
	box-shadow: inset 2px 0 0 var(--green-500), inset -2px 0 0 var(--green-500);
}
.hmcb-table tbody tr:last-child td:nth-child(2) {
	box-shadow: inset 2px 0 0 var(--green-500), inset -2px 0 0 var(--green-500), inset 0 -2px 0 var(--green-500);
}
.hmcb-table tbody td:nth-child(2) {
	color: var(--navy-700);
	font-weight: 600;
}
.hmcb-table-hint { display: none; }
@media (max-width: 767px) {
	.hmcb-table table { min-width: 760px; }
	.hmcb-table th:first-child,
	.hmcb-table td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		width: 116px;
		min-width: 116px;
		background: var(--surface-card);
		box-shadow: 1px 0 0 var(--border-subtle);
	}
	.hmcb-table thead th:first-child { background: var(--surface-sunken); }
	.hmcb-table tbody tr:nth-child(even) td:first-child { background: var(--grey-25); }
	.hmcb-table-hint {
		display: block;
		margin: -16px 0 12px !important;
		font-size: 14px;
		font-weight: 600;
		color: var(--grey-600);
	}
}

/* ---------- Features grid: no empty slot ---------- */
@media (min-width: 1100px) {
	.hmcb-grid.hmcb-features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.hmcb-grid.hmcb-features > :last-child:nth-child(4n + 3) { grid-column: span 2; }
}
@media (min-width: 640px) and (max-width: 1099px) {
	.hmcb-grid.hmcb-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hmcb-grid.hmcb-features > :last-child:nth-child(odd) { grid-column: span 2; }
}

/* ---------- reCAPTCHA: hide the floating badge; the notice is in the footer ---------- */
.grecaptcha-badge { visibility: hidden !important; }
.hmcb-site-footer__bottom-inner p a {
	color: inherit;
	text-decoration: underline;
}

/* ---------- Rule rows on small phones: badge above, not squeezed beside ---------- */
@media (max-width: 480px) {
	.hmcb-rule { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.hmcb-rule .hmcb-badge { justify-self: start; grid-row: 1; }
}

/* ---------- Audience cards: the label opens the card, so show it as an expander, not a link ---------- */
.hmcb-side__cta {
	padding: 8px 14px;
	border: 1px solid rgba(141, 198, 63, .55);
	border-radius: 999px;
	background: rgba(14, 14, 39, .35);
	transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.hmcb-side:hover .hmcb-side__cta,
.hmcb-side:focus-visible .hmcb-side__cta {
	background: rgba(141, 198, 63, .18);
	border-color: var(--green-500);
}
.hmcb-side__cta::after {
	-webkit-mask-image: var(--hmcb-plus);
	mask-image: var(--hmcb-plus);
	transition: transform 220ms var(--ease-out);
}
.hmcb-side.is-open .hmcb-side__cta::after { transform: rotate(45deg); }
.hmcb-side:focus-visible { outline: none; box-shadow: var(--ring-focus), var(--shadow-4); }

/* Audience card points (list replaces the old one-line teaser) */
.hmcb-side__points {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 10px;
	font-size: 16px;
}
.hmcb-side__points li { margin: 0; padding-left: 18px; position: relative; }
.hmcb-side__points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .6em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--green-500);
}
.hmcb-side__points strong { color: #fff; font-weight: 700; }
.hmcb-side.is-open .hmcb-side__body.hmcb-side__points { max-height: 520px; }
.hmcb-side.wp-block-cover.is-open { height: auto; }
.hmcb-side .wp-block-cover__background { transition: opacity 420ms var(--ease-out); }
.hmcb-side.is-open .wp-block-cover__background {
	opacity: 1 !important;
	background: linear-gradient(0deg, rgba(14, 14, 39, .95) 0%, rgba(14, 14, 39, .88) 55%, rgba(14, 14, 39, .45) 100%) !important;
}

/* ---------- FAQ page (faq-block-for-gutenberg plugin): match the homepage FAQ ---------- */
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq {
	background: transparent !important;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--border-subtle);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.5;
	color: var(--text-body);
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq:not(:has(+ .wp-block-faq-block-for-gutenberg-faq)) {
	border-bottom: 1px solid var(--border-subtle);
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 44px;
	padding: 20px 0 !important;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--text-heading) !important;
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question h4 {
	margin: 0 !important;
	font: inherit;
	color: inherit !important;
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question::before { display: none !important; }
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question::after {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background: var(--green-700);
	-webkit-mask: var(--hmcb-plus) center / contain no-repeat;
	mask: var(--hmcb-plus) center / contain no-repeat;
	transition: transform 220ms var(--ease-out);
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question.active { color: var(--green-800) !important; }
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .question.active::after { transform: rotate(45deg); }
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq .answer {
	padding: 0 0 24px !important;
	max-width: 68ch;
	color: var(--text-body) !important;
}
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq + .wp-block-heading,
.hmcb-doc .wp-block-faq-block-for-gutenberg-faq + .wp-block-spacer + .wp-block-heading { margin-top: 64px; }

/* ---------- Hero quiz: "simplified example" note under the card ---------- */
.hmcb-quiz__note {
	margin: 12px 0 0 !important;
	font-size: 13px;
	line-height: 1.4;
	color: rgba(255, 255, 255, .78);
	text-align: right;
	max-width: 36ch;
	margin-left: auto !important;
	text-wrap: balance;
}
@media (max-width: 767px) { .hmcb-quiz__note { text-align: left; margin-left: 0 !important; max-width: none; } }

/* ---------- Pillar 2 panel: core health vs. where we shine ---------- */
.hmcb-rule.is-shine {
	background: var(--green-50);
	border-color: var(--green-500);
	box-shadow: 0 0 0 1px var(--green-500), var(--shadow-3);
	padding-top: 22px;
	padding-bottom: 22px;
}
.hmcb-rule.is-shine .hmcb-rule__who { color: var(--green-800); font-weight: 600; }
.hmcb-rule.is-shine .hmcb-badge {
	background: var(--green-500);
	color: var(--navy-800);
	border-color: var(--green-500);
}
.hmcb-panel__caption {
	margin: 4px 0 0 !important;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-body);
}

/* ---------- How it works: back / next inside the step card ---------- */
.hmcb-step__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px !important;
}
.hmcb-step__nav button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--border-subtle);
	border-radius: 999px;
	background: var(--surface-card);
	color: var(--navy-700);
	font: 600 15px/1.2 var(--font-sans);
	cursor: pointer;
	transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.hmcb-step__nav button:hover { border-color: var(--green-500); background: var(--green-50); }
.hmcb-step__nav button:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.hmcb-step__next { margin-left: auto; border-color: var(--green-500) !important; }
.hmcb-step__next::after,
.hmcb-step__prev::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--hmcb-arrow) center / contain no-repeat;
	mask: var(--hmcb-arrow) center / contain no-repeat;
}
.hmcb-step__prev::before { transform: scaleX(-1); }

/* Step 3: real dashboard screenshot */
.hmcb-step__visual.is-shot { justify-content: center; gap: 12px; }
.hmcb-shot img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	box-shadow: var(--shadow-3);
}
.hmcb-shot__caption { font-size: 13px; line-height: 1.4; color: var(--grey-600); }

/* Step 3: dashboard visual (recreated from the real dashboard, example data) */
.hmcb-dashv { display: grid; gap: 12px; }
.hmcb-dashv__card {
	background: var(--surface-card);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-2);
	padding: 16px 18px;
}
.hmcb-dashv__title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--navy-700); }
.hmcb-dashv__chart { display: block; width: 100%; height: 64px; }
.hmcb-dashv__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--grey-100);
	text-align: center;
}
.hmcb-dashv__stats span { display: block; font-size: 12px; color: var(--grey-500); }
.hmcb-dashv__stats strong { display: block; font-size: 20px; line-height: 1.3; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.hmcb-dashv__card.is-split {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	column-gap: 18px;
	align-items: center;
}
.hmcb-dashv__card.is-split .hmcb-dashv__title { grid-column: 1 / -1; }
.hmcb-dashv__donut { width: 92px; height: 92px; transform: rotate(0deg); }
.hmcb-dashv__legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 14px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--grey-700);
}
.hmcb-dashv__legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.hmcb-dashv__legend b { margin-left: auto; font-weight: 600; color: var(--navy-700); }
.hmcb-dashv__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 480px) {
	.hmcb-dashv__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
	.hmcb-dashv__card.is-split { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
	.hmcb-dashv__donut { justify-self: center; }
	.hmcb-dashv__legend { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Employee demo companies ---------- */
.hmcb-demos__intro { margin-bottom: 40px !important; }
.hmcb-demos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
	gap: 20px;
}
.hmcb-demo-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--surface-card);
	border: 1px solid var(--border-subtle);
	border-radius: 20px;
	box-shadow: var(--shadow-2);
	color: inherit;
	text-decoration: none;
	transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.hmcb-demo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-4); border-color: var(--green-500); }
.hmcb-demo-card:focus-visible { outline: none; box-shadow: var(--ring-focus), var(--shadow-4); }
.hmcb-demo-card__shot { display: block; aspect-ratio: 5 / 3; overflow: hidden; background: var(--grey-100); }
.hmcb-demo-card__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 420ms var(--ease-out); }
.hmcb-demo-card:hover .hmcb-demo-card__shot img { transform: scale(1.03); }
.hmcb-demo-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.hmcb-demo-card__tag { font-size: 12px; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--green-700); }
.hmcb-demo-card__name { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--navy-700); }
.hmcb-demo-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--sky-700);
}
.hmcb-demo-card__cta::after {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--hmcb-arrow) center / contain no-repeat;
	mask: var(--hmcb-arrow) center / contain no-repeat;
	transition: transform 160ms var(--ease-out);
}
.hmcb-demo-card:hover .hmcb-demo-card__cta::after { transform: translateX(3px); }
