/*
Theme Name: Charis Group
Theme URI: https://charisgrants.com/
Author: Charis
Description: Charis Group site. Child of Improving Lives: same tokens and charis/* blocks, Group header, dark page header and Group templates.
Template: charis-improving-lives
Requires at least: 6.9
Requires PHP: 7.4
Version: 0.2.14
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: charis-group
Tags: block-theme, full-site-editing
*/

/* ==========================================================================
 * Header — Figma "D / Header - Group": indigo bar 1280x108, 4px tangerine
 * top line, logo 130x50 at x40/y28, links Light blue (#E5E9FF), current
 * Tangerine (#FF4F14), white outlined "Book a demo" (131x40).
 * ======================================================================= */

.wp-block-group.charis-header,
.wp-block-group.charis-header.is-stuck {
	background-color: var(--wp--preset--color--brand-indigo);
}

.charis-header__logo {
	width: 131px;
	height: 50px;
}

.charis-header__logo-img {
	background-image: var(--charis-logo-main, url(assets/images/logo.svg));
}

.charis-header__logo-img--compact {
	background-image: var(--charis-logo-compact, url(assets/images/logo-compact.svg));
}

/* One lockup in every state and page (no large Group home logo). */
.charis-header__logo-img--large {
	opacity: 0;
}

.charis-header__logo-img--compact {
	opacity: 1;
}

@media (min-width: 1024px) {

	body.home .charis-header__logo,
	body.home .wp-block-group.charis-header.is-stuck .charis-header__logo {
		top: 28px;
		width: 131px;
		height: 50px;
	}

	body.home .charis-header__logo-img--large {
		opacity: 0;
	}

	body.home .charis-header__logo-img--compact {
		opacity: 1;
	}
}

@media (max-width: 1023px) {

	.charis-header__logo,
	body.home .charis-header__logo,
	body.home .wp-block-group.charis-header.is-stuck .charis-header__logo {
		top: 20px;
		width: 94px;
		height: 36px;
	}

	.charis-header__logo-img--large {
		opacity: 0;
	}

	.charis-header__logo-img--compact {
		opacity: 1;
	}

	body.home .wp-block-template-part:has(> .charis-header) {
		--charis-header-h: 76px;
		--charis-header-reach: 76px;
	}
}

.charis-nav__list a {
	color: var(--wp--preset--color--bg-lightblue);
}

.charis-header .charis-nav__list a:hover {
	color: var(--wp--preset--color--bg-white);
}

.charis-header .charis-nav__list a[aria-current="page"] {
	color: var(--wp--preset--color--brand-tangerine);
}

.charis-header .charis-header__signin .wp-block-button__link {
	border-color: var(--wp--preset--color--bg-white);
	color: var(--wp--preset--color--bg-white);
}

.charis-header .charis-header__signin .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--bg-lightblue);
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--wp--preset--color--bg-lightblue);
}

/* "Get a quote" sits next to "Book a demo" in the same outlined style. */
.charis-header .charis-header__signin {
	gap: 16px;
}

/* Phones: both buttons stay in the bar, a little smaller (13px, 8px side
 * padding, 6px apart) so they fit next to the logo from 375px. Narrower
 * phones move "Get a quote" into the menu drawer (white outline on Indigo,
 * like the header buttons). */
.charis-header .charis-menu-drawer__quote {
	display: none;
}

@media (max-width: 767px) {

	.charis-header .charis-header__signin {
		gap: 6px;
	}

	.charis-header .charis-header__signin .wp-block-button__link {
		padding: 6.5px 8px;
		font-size: 13px;
	}
}

@media (max-width: 374px) {

	.charis-header .charis-header__signin .charis-header__quote {
		display: none;
	}

	.charis-header .charis-menu-drawer__quote {
		display: flex;
		margin: 24px 0 0;
	}

	.charis-header .charis-menu-drawer__quote .wp-block-button__link {
		border-color: var(--wp--preset--color--bg-white);
		color: var(--wp--preset--color--bg-white);
	}

	.charis-header .charis-menu-drawer__quote .wp-block-button__link:hover {
		border-color: var(--wp--preset--color--bg-lightblue);
		background-color: rgba(255, 255, 255, 0.08);
		color: var(--wp--preset--color--bg-lightblue);
	}
}

/* "Sign in." — Figma Group header (922-11337): a Menu link 40px after
 * "Book a demo"; Tangerine on the Sign in page itself. Below 1024px it moves
 * into the drawer next to the primary links. */
.charis-header .charis-header__login {
	flex: 0 0 auto;
	margin: 0 0 0 40px;
}

.charis-header__login a,
.charis-menu-drawer__login a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--bg-lightblue);
	font-family: var(--charis-font-display);
	font-size: var(--wp--preset--font-size--fs-control-s);
	font-weight: 600;
	letter-spacing: var(--wp--custom--charis--ls-control);
	line-height: 24px;
	text-decoration: none;
	transition: color var(--charis-hover-duration) var(--charis-hover-easing);
}

.charis-header__login a:hover,
.charis-menu-drawer__login a:hover {
	color: var(--wp--preset--color--bg-white);
}

.charis-header__login a[aria-current="page"],
.charis-menu-drawer__login a[aria-current="page"] {
	color: var(--wp--preset--color--brand-tangerine);
}

.charis-menu-drawer .charis-menu-drawer__login {
	margin: 32px 0 0;
}

.charis-menu-drawer__login a {
	min-height: 40px;
	color: var(--wp--preset--color--bg-white);
	font-size: 32px;
	line-height: 40px;
	letter-spacing: 0;
}

.charis-menu-drawer .charis-menu-drawer__login a:hover,
.charis-menu-drawer .charis-menu-drawer__login a[aria-current="page"] {
	color: var(--wp--preset--color--brand-periwinkle);
}

@media (min-width: 1024px) {

	.charis-menu-drawer .charis-menu-drawer__login {
		display: none;
	}
}

@media (max-width: 1023px) {

	.charis-header .charis-header__login {
		display: none;
	}
}

/* Narrow desktop (1024-1199): five menu links, "Book a demo" and
 * "Sign in." need tighter gaps or the menu runs under the logo. */
@media (min-width: 1024px) and (max-width: 1199px) {

	.charis-header .charis-nav .wp-block-list.charis-nav__list {
		gap: 24px;
	}

	.charis-header .charis-header__signin {
		margin-left: 32px;
	}

	.charis-header .charis-header__login {
		margin-left: 24px;
	}
}

.charis-menu-toggle {
	border-color: var(--wp--preset--color--bg-white);
	color: var(--wp--preset--color--bg-white);
}

/* Footer and drawer logos: white lockup. */
.charis-footer__logo,
.charis-menu-drawer__logo-img {
	background-image: var(--charis-logo-white, url(assets/images/logo-white.svg));
}

/* ==========================================================================
 * Page header — Figma "Header" band: indigo, padding 40/40/24, H1 64/72
 * white. No breadcrumbs on the Group site.
 * ======================================================================= */

.charis-page .charis-page-header.charis-page-header--group {
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
	background-color: var(--wp--preset--color--brand-indigo);
	color: var(--wp--preset--color--bg-white);
}

.charis-page-header--group .charis-page-header__title {
	color: var(--wp--preset--color--bg-white);
}

/* Section-composed pages: the content's page hero is the Group header band. */
.charis-site-group .wp-block-group.is-style-page-hero {
	padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
	background-color: var(--wp--preset--color--brand-indigo);
	color: var(--wp--preset--color--bg-white);
}

.charis-site-group .wp-block-group.is-style-page-hero .wp-block-post-title {
	color: var(--wp--preset--color--bg-white);
}

.charis-site-group .wp-block-group.is-style-page-hero .wp-block-post-excerpt {
	color: var(--wp--preset--color--bg-white);
}

@media (max-width: 767px) {

	.charis-site-group .wp-block-group.is-style-page-hero {
		padding-block: var(--wp--preset--spacing--60);
	}
}

/* Tablet: the copy column beside the wheel is ~400px, too narrow for a 64px
 * one-word H1 ("CharisConnect."), which overflow-wrap then broke mid-word. */
@media (min-width: 768px) and (max-width: 1023px) {

	.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media .wp-block-post-title {
		font-size: 48px;
		line-height: 56px;
	}
}

/* Page hero with media — Figma "Desktop / Find support" → Header (794:6459):
 * a 400px Indigo band, H1 and a Body/L Light lead (816 wide) on the left,
 * the CharisConnect wheel (charis/connect-wheel, Figma "Wheel" 320×320) on
 * the right. Below 768px the wheel stacks under the copy. */
.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 400px;
	padding-block: var(--wp--preset--spacing--100);
}

.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media > .charis-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 816px) 320px;
	gap: var(--wp--preset--spacing--80);
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.charis-hero--media .charis-hero__copy > * {
	margin-block: 0;
}

.charis-hero--media .charis-hero__copy > * + * {
	margin-top: var(--wp--preset--spacing--60);
}

.charis-hero--media .charis-hero__lead {
	color: var(--wp--preset--color--bg-white);
	font-size: var(--wp--preset--font-size--fs-body-l);
	font-weight: 300;
	letter-spacing: 0.05em;
	line-height: 32px;
}

.charis-hero--media .charis-hero__media {
	justify-self: end;
	width: 320px;
}

@media (max-width: 1023px) {

	.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media > .charis-hero__inner {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: var(--wp--preset--spacing--70);
	}

	.charis-hero--media .charis-hero__media {
		width: 260px;
	}
}

@media (max-width: 767px) {

	.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media {
		min-height: 0;
		padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--80);
	}

	.charis-site-group .wp-block-group.is-style-page-hero.charis-hero--media > .charis-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.charis-hero--media .charis-hero__lead {
		font-size: var(--wp--preset--font-size--fs-body-m);
		line-height: 24px;
	}

	.charis-hero--media .charis-hero__media {
		justify-self: center;
		width: min(320px, 100%);
	}
}

/* Lead paragraph — Figma "Section / Big text": H4 Light 32/40, 800 wide. */
p.is-style-lead {
	max-width: 800px;
	margin: 0;
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-h-4);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 40px;
}

@media (max-width: 767px) {

	p.is-style-lead {
		font-size: var(--wp--preset--font-size--fs-h-5);
		line-height: 32px;
	}
}

/* Group body copy: Figma paragraph spacing 12 (Body/M, "Text blocks"). */
.charis-site-group .wp-block-charis-annotated-text .wp-block-charis-annotated-text__content p + p {
	margin-top: var(--wp--preset--spacing--30);
}

/* ==========================================================================
 * Group single templates (jobs, initiatives): dark back link band, dark
 * page header, then section-composed content on a 1200px column.
 * ======================================================================= */

.charis-site-group .wp-block-charis-back-link {
	padding-block: var(--wp--preset--spacing--60) 0;
	background-color: var(--wp--preset--color--brand-indigo);
	color: var(--wp--preset--color--bg-white);
}

.charis-site-group .wp-block-charis-back-link__link {
	margin: 0;
	color: var(--wp--preset--color--bg-white);
}

.charis-site-group .wp-block-charis-back-link__link:hover {
	color: var(--wp--preset--color--bg-lightblue);
}

.charis-site-group .wp-block-charis-back-link__icon {
	width: 16px;
	height: 16px;
}

.charis-page--group-single > * {
	margin-block: 0;
}

/* Content sections own their backgrounds and vertical padding; the body
 * only supplies the 1200px column. */
.charis-page .wp-block-post-content.charis-page__body--sections {
	padding: 0;
	background: transparent;
}

.charis-page .wp-block-post-content.charis-page__body--sections > * {
	margin-block: 0;
}

.charis-page .wp-block-post-content.charis-page__body--sections > *:not(.alignfull),
.charis-page--group-single > .charis-section {
	box-sizing: border-box;
	max-width: none;
	padding-inline: max(40px, calc((100% - 1200px) / 2));
}

@media (max-width: 1023px) {

	.charis-page .wp-block-post-content.charis-page__body--sections > *:not(.alignfull),
	.charis-page--group-single > .charis-section {
		padding-inline: var(--wp--preset--spacing--30);
	}
}

/* Bulleted copy (Job description: Body/M, list spacing 8, Indigo bullets). */
.charis-site-group .wp-block-charis-annotated-text__content .wp-block-list {
	margin: 0;
	padding-left: 27px;
	color: var(--wp--preset--color--brand-indigo);
}

.charis-site-group .wp-block-charis-annotated-text__content .wp-block-list li {
	margin: 0;
	font-size: var(--wp--preset--font-size--fs-body-m);
	font-weight: 300;
	letter-spacing: var(--wp--custom--charis--ls-body);
	line-height: 24px;
}

.charis-site-group .wp-block-charis-annotated-text__content .wp-block-list li + li {
	margin-top: var(--wp--preset--spacing--20);
}

.charis-site-group .wp-block-charis-annotated-text__content .wp-block-list li::marker {
	font-weight: 300;
}

.charis-site-group .wp-block-charis-back-link > .wp-block-charis-back-link__inner {
	display: flex;
}

.charis-site-group .wp-block-charis-media-callout__note a {
	line-height: 1;
}

.charis-page--group-single {
	background-color: var(--wp--preset--color--bg-grey);
}

.charis-site-group .wp-block-charis-media-callout .wp-block-charis-media-callout__note a {
	color: var(--wp--preset--color--brand-indigo);
}

/* Body/M tracking (5%) on Group copy blocks. */
.charis-site-group .wp-block-charis-annotated-text .wp-block-charis-annotated-text__content p {
	letter-spacing: var(--wp--custom--charis--ls-body);
}

/* Section-composed bodies: the picture banner keeps the 1200 column. */
.charis-page .wp-block-post-content.charis-page__body--sections > .wp-block-charis-media-banner {
	width: min(calc(100% - 80px), 1200px);
	margin-inline: auto;
	padding: 0;
}

/* Figma Group "Picture + slogan": a flat 20% black veil over the photo,
 * plus a soft shade under the bottom-left heading. With the veil alone the
 * white heading fell to 1.8–2.8:1 on bright photo areas (WCAG 1.4.3 needs
 * 3:1 for this large text); the shade only darkens where the heading sits. */
.charis-site-group .wp-block-charis-media-banner::after {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 80%),
		linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.5) 100%),
		rgba(0, 0, 0, 0.2);
}

@media (max-width: 1023px) {

	.charis-page .wp-block-post-content.charis-page__body--sections > .wp-block-charis-media-banner {
		width: calc(100% - 24px);
	}
}

.charis-site-group .wp-block-charis-annotated-text.is-style-large .wp-block-charis-annotated-text__content p + p {
	margin-top: var(--wp--preset--spacing--60);
}

/* Numbers sit inside a padded Group section: no extra band padding. */
.charis-site-group .wp-block-group > .wp-block-charis-numbers {
	padding-block: 0;
}

/* ==========================================================================
 * Section intro (core/group style "intro" / "intro-narrow"): H3 40/48 (900
 * or 800 wide) and Body/M paragraphs 800 wide, 16 under the heading, 12
 * between paragraphs, 40 to whatever follows (Figma "Text" pad 8 + gap 32).
 * ======================================================================= */
.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) {
	margin-block-end: var(--wp--preset--spacing--80);
	color: var(--wp--preset--color--brand-indigo);
}

.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > * {
	margin-block: 0;
}

.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > :is(h2, h3) {
	max-width: 900px;
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-h-3);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 48px;
}

.wp-block-group.is-style-intro-narrow > :is(h2, h3) {
	max-width: 800px;
}

.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > p {
	max-width: 800px;
	font-size: var(--wp--preset--font-size--fs-body-m);
	font-weight: 300;
	letter-spacing: var(--wp--custom--charis--ls-body);
	line-height: 24px;
}

.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > :is(h2, h3) + p {
	margin-block-start: var(--wp--preset--spacing--40);
}

.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > p + p {
	margin-block-start: var(--wp--preset--spacing--30);
}

@media (max-width: 767px) {

	.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) {
		margin-block-end: var(--wp--preset--spacing--60);
	}

	.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > :is(h2, h3) {
		font-size: var(--wp--preset--font-size--fs-h-5);
		line-height: 32px;
	}

	.wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > p {
		font-size: var(--wp--preset--font-size--fs-body-s);
	}
}

/* Strong lead-in inside Group copy (Body/M Bold = NHG 65 Medium). */
.charis-site-group .wp-block-charis-annotated-text__content strong {
	font-weight: 600;
}

/* Checklist (core/list style "checklist", Figma "List of points"): 48px
 * Purple check, 16 gap, title Body/M Bold + line Body/S, 24 between items. */
.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
	margin: 0;
	padding: var(--wp--preset--spacing--20) 0;
	list-style: none;
}

.charis-site-group .wp-block-charis-annotated-text__content > * + .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) {
	margin-top: var(--wp--preset--spacing--40);
}

.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) li {
	position: relative;
	min-height: 48px;
	margin: 0;
	padding-left: 64px;
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-body-s);
	font-weight: 300;
	letter-spacing: var(--wp--custom--charis--ls-body-s);
	line-height: 24px;
}

.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) li + li {
	margin-top: 0;
}

.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) li::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 48px;
	height: 48px;
	background: var(--charis-check-icon, url(assets/icons/check.svg)) center / 48px 48px no-repeat;
	content: "";
}

/* Figma "Illustration / Check small" colours (default Purple above). */
.charis-site-group .wp-block-list.is-style-checklist-peach {
	--charis-check-icon: url(assets/icons/check-peach.svg);
}

.charis-site-group .wp-block-list.is-style-checklist-lavender {
	--charis-check-icon: url(assets/icons/check-lavender.svg);
}

.charis-site-group .wp-block-list.is-style-checklist-periwinkle {
	--charis-check-icon: url(assets/icons/check-periwinkle.svg);
}

.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) li::marker {
	content: none;
}

.charis-site-group .wp-block-list:is(.is-style-checklist, .is-style-checklist-peach, .is-style-checklist-lavender, .is-style-checklist-periwinkle) li strong {
	display: block;
	margin-bottom: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--fs-body-m);
	font-weight: 600;
	letter-spacing: var(--wp--custom--charis--ls-body);
}

/* Media banner inside a padded section group keeps the column width. */
.charis-site-group .wp-block-group > .wp-block-charis-media-banner + .wp-block-charis-feature-tiles {
	margin-top: var(--wp--preset--spacing--70);
}

/* Full-width rounded picture (Figma "image 4", r24). */
.charis-site-group .wp-block-image.is-style-rounded-24 img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--preset--border-radius--r-24);
}

/* Delivery model picture: Figma shows it whole on white inside the r24 box. */
.charis-site-group .wp-block-image.is-style-rounded-24 img {
	background-color: var(--wp--preset--color--bg-white);
}

/* Section intro on Indigo (Home "Get"): Mist copy, Body/S line 12 below. */
.wp-block-group.has-brand-indigo-background-color > .wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > :is(h2, h3, p) {
	color: var(--wp--preset--color--bg-grey);
}

.wp-block-group.has-brand-indigo-background-color > .wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > p {
	font-size: var(--wp--preset--font-size--fs-body-s);
	letter-spacing: var(--wp--custom--charis--ls-body-s);
}

.wp-block-group.has-brand-indigo-background-color > .wp-block-group:is(.is-style-intro, .is-style-intro-narrow) > :is(h2, h3) + p {
	margin-block-start: var(--wp--preset--spacing--30);
}

/* Centred row of buttons (Home under the numbers): a full-width row so the
 * pair is centred on the page at every width (not inside the 840px column). */
.charis-site-group .wp-block-buttons.is-content-justification-center {
	box-sizing: border-box;
	max-width: none;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
}

/* Figma Group pages sit on Mist (#F4F4F4): sections without their own fill
 * (Big text, Numbers, Partners) show the page colour. */
body.charis-site-group {
	background-color: var(--wp--preset--color--bg-grey);
}

/* ==========================================================================
 * Mobile UX pass (adapt). Desktop stays pixel-matched to Figma; these rules
 * only change phones / tablets or enlarge hit areas without moving pixels.
 * ======================================================================= */

/* Single-template header band: the IL 16px Mist seam between the back link
 * and the title does not exist on Group (one continuous Indigo band), and the
 * title shares the 12px page gutter with every other block. */
@media (max-width: 1023px) {

	body:not(.home) .charis-page .charis-page-header.charis-page-header--group {
		border-block-start: 0;
		padding-inline: var(--wp--preset--spacing--30);
	}
}

/* Centred button rows stack into full-width, equal buttons on phones (the
 * IL mobile pattern: one thumb-sized target per line). */
@media (max-width: 767px) {

	.charis-site-group .wp-block-buttons.is-content-justification-center {
		flex-direction: column;
		align-items: stretch;
		gap: var(--wp--preset--spacing--30);
	}

	.charis-site-group .wp-block-buttons.is-content-justification-center > .wp-block-button {
		width: 100%;
	}

	.charis-site-group .wp-block-buttons.is-content-justification-center > .wp-block-button > .wp-block-button__link {
		box-sizing: border-box;
		justify-content: center;
		width: 100%;
	}
}

/* Text links (Back to…, Book a demo →, Explore careers →) are 24px tall;
 * give them a 44px touch target without changing the layout. */
@media (pointer: coarse) {

	.charis-site-group .wp-block-button.is-style-link > .wp-block-button__link,
	.charis-site-group .wp-block-charis-back-link__link {
		padding-block: 10px;
		margin-block: -10px;
	}
}

/* Group pages are Mist (Figma frame fill #F4F4F4); the IL page template paints
 * its wrapper and body white, which hid the white About tiles on white. */
.charis-site-group .charis-page,
.charis-site-group .charis-page .wp-block-post-content.charis-page__body {
	background-color: transparent;
}

/* Section-composed pages: panels with a background (white photo-card panel,
 * Indigo cards panel) keep the 1200px content column on screens wider than
 * 1280 — the IL rule gives them a flat 40px inset, which stretched the
 * cards. */
@media (min-width: 1024px) {

	.charis-site-group .charis-page .wp-block-post-content.charis-page__body--sections > .wp-block-group:is(.has-background, .is-style-on-lightpeach):not(.is-style-hero):not(.is-style-page-hero):not(.is-style-sheet):not(.is-style-section-stack):not(.is-style-block-stack):not(.is-style-content-section) {
		padding-inline: max(40px, calc((100% - 1200px) / 2));
	}
}

/* ==========================================================================
 * News article — Figma Charis Group "Desktop / Article" (813:8186).
 * Indigo header: back link, H1 64/72, a date row (24px calendar icon +
 * Body/Tag 16 ls 0.06em). Grey body band: the first paragraph is the lead
 * (32/40), then Body M 18/24 (ls 0.05em, 300) on an 800px column, paragraphs
 * 12px apart, list items 8px apart, then the Share row under a Periwinkle
 * rule. "Related news." is charis/news-grid (related mode).
 * The News page itself is two charis/news-grid blocks (page-news.html).
 * ======================================================================= */

.charis-news-single .charis-page-header--group {
	padding-bottom: var(--wp--preset--spacing--60);
}

.charis-news-single .charis-news-single__date {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	align-items: center;
	margin: 4px 0 0; /* + the header's 12px gap = 16px under the H1 */
	color: var(--wp--preset--color--bg-white);
	font-size: var(--wp--preset--font-size--fs-body-s);
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 24px;
}

.charis-news-single .charis-news-single__date::before {
	flex: none;
	width: 24px;
	height: 24px;
	background-color: currentcolor;
	content: "";
	mask: url(assets/icons/date.svg) no-repeat center / 24px 24px;
}

.charis-news-single .charis-news-single__article {
	padding-block: 64px 63px;
}

.charis-news-single .charis-news-single__content {
	max-width: 800px;
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-body-m);
	font-weight: 300;
	letter-spacing: 0.05em;
	line-height: 24px;
}

.charis-news-single .charis-news-single__content > * {
	margin-block: 0;
}

.charis-news-single .charis-news-single__content > * + * {
	margin-top: 12px;
}

/* Lead: the article's first paragraph (Figma "Section / Big text"). */
.charis-news-single .charis-news-single__content > p:first-child {
	margin-bottom: 32px;
	font-size: var(--wp--preset--font-size--fs-h-4);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 40px;
}

.charis-news-single .charis-news-single__content > p:first-child + * {
	margin-top: 0;
}

.charis-news-single .charis-news-single__content :is(ul, ol) {
	padding-left: 27px; /* Figma list text at x 67 */
}

.charis-news-single .charis-news-single__content li {
	line-height: 24px;
}

.charis-news-single .charis-news-single__content li + li {
	margin-top: 8px;
}

.charis-news-single .charis-news-single__content li::marker {
	font-size: 12px;
}

.charis-news-single .charis-news-single__content :is(h2, h3, h4) {
	margin-top: var(--wp--preset--spacing--70);
	color: var(--wp--preset--color--brand-indigo);
	font-weight: 600;
	letter-spacing: 0;
}

.charis-news-single .charis-news-single__content h2 {
	font-size: var(--wp--preset--font-size--fs-h-4);
	line-height: 40px;
}

.charis-news-single .charis-news-single__content :is(h3, h4) {
	font-size: var(--wp--preset--font-size--fs-h-5);
	line-height: 28px;
}

.charis-news-single .charis-news-single__content a {
	color: var(--wp--preset--color--brand-red);
	text-underline-offset: 3px;
}

.charis-news-single .charis-news-single__content a:hover {
	color: var(--wp--preset--color--brand-red-hover);
}

.charis-news-single .charis-news-single__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--wp--preset--border-radius--r-24);
}

.charis-news-single .charis-news-single__share {
	margin-top: 31px;
}

@media (max-width: 767px) {

	.charis-news-single .charis-news-single__date {
		margin-top: var(--wp--preset--spacing--40);
	}

	.charis-news-single .charis-news-single__article {
		padding-block: var(--wp--preset--spacing--80);
	}

	.charis-news-single .charis-news-single__content {
		font-size: var(--wp--preset--font-size--fs-body-s);
	}

	.charis-news-single .charis-news-single__content > p:first-child {
		margin-bottom: var(--wp--preset--spacing--60);
		font-size: var(--wp--preset--font-size--fs-h-5);
		line-height: 32px;
	}

	.charis-news-single .charis-news-single__share {
		margin-top: var(--wp--preset--spacing--60);
	}
}

/* A Numbers block in an article (e.g. a research report) uses the full
 * 1200 column instead of the 800px reading width, as on the other pages. */
.charis-news-single .charis-news-single__content > .wp-block-charis-numbers {
	width: min(1200px, calc(100vw - 80px));
	max-width: none;
	margin-block: var(--wp--preset--spacing--80);
}

@media (max-width: 1023px) {

	.charis-news-single .charis-news-single__content > .wp-block-charis-numbers {
		width: auto;
	}
}

/* Block editor canvas: the same 1200px column and side gutters as the
 * published section-composed pages (the canvas has no page wrapper). */
.is-root-container.charis-site-group > *:not(.alignfull) {
	box-sizing: border-box;
	max-width: none;
	padding-inline: max(40px, calc((100% - 1200px) / 2));
}

@media (max-width: 1023px) {

	.is-root-container.charis-site-group > *:not(.alignfull) {
		padding-inline: var(--wp--preset--spacing--30);
	}
}

/* ==========================================================================
 * CharisConnect — Figma Charis Group "Desktop / Find support" (794:6457).
 * Section stack: grey intro (lead + compact product-cards "Connect" map with
 * step pills), three product sections alternating white / grey (H1-size
 * title, dim media banner, program list), grey "Key features and benefits."
 * (feature-tiles, detailed) and the Group calculator banner.
 * ======================================================================= */

.charis-connect > .charis-connect__intro {
	padding-block: var(--wp--preset--spacing--80);
}

.charis-connect__intro > .is-style-lead {
	margin: 0 0 var(--wp--preset--spacing--70);
}

.charis-connect > .charis-connect__product,
.charis-connect > .charis-connect__features {
	padding-block: var(--wp--preset--spacing--100);
}

/* In-page anchors from the Connect map land under the sticky header. */
.charis-connect > .charis-connect__product {
	scroll-margin-top: var(--charis-header-h, 76px);
}

.charis-connect__product > * {
	margin-block: 0;
}

.charis-connect__product > * + * {
	margin-top: var(--wp--preset--spacing--80);
}

.charis-connect .charis-connect__title {
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-h-1);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 72px;
}

@media (max-width: 767px) {

	.charis-connect > .charis-connect__intro {
		padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--80);
	}

	.charis-connect > .charis-connect__product,
	.charis-connect > .charis-connect__features {
		padding-block: var(--wp--preset--spacing--90);
	}

	.charis-connect__product > * + * {
		margin-top: var(--wp--preset--spacing--60);
	}

	.charis-connect .charis-connect__title {
		font-size: 40px;
		line-height: 48px;
	}
}

/* ==========================================================================
 * Initiative landing — Figma Charis Group "Desktop / Initiative" (825:8819).
 * The landing header/footer parts (header-landing.html, footer-landing.html)
 * replace the regular ones when the initiative's "Landing header and
 * footer" toggle is on (plugins/charis-blocks/inc/Content/LandingChrome.php):
 * in-page anchor menu + a white "Get set up" button, footer with LinkedIn
 * only. Sections are square full-width bands (.charis-band).
 * ======================================================================= */

/* Header button — Figma "Button / Dark bg / Primary / Small": white fill,
 * Indigo label, 40 tall, padding 8/16, no arrow. Hover: Light blue 30% over
 * white, label Indigo hover. */
.charis-header .charis-header__cta .wp-block-button__link {
	padding: 8px 16px;
	border: 0;
	background-color: var(--wp--preset--color--bg-white);
	color: var(--wp--preset--color--brand-indigo);
}

.charis-header .charis-header__cta .wp-block-button__link::after {
	display: none;
}

.charis-header .charis-header__cta .wp-block-button__link:hover {
	background:
		linear-gradient(var(--wp--custom--charis--tint-blue-30), var(--wp--custom--charis--tint-blue-30)),
		var(--wp--preset--color--bg-white);
	color: var(--wp--preset--color--brand-indigo-hover);
}

/* Anchor menu: 40px apart in Figma, as the site menu. Links are Light blue
 * and turn white on hover (Group header rule above). */
.charis-header--landing .charis-nav .wp-block-list.charis-nav__list {
	gap: 40px;
}

/* Drawer (tablet/phone): the header button under the anchor links. */
.charis-menu-drawer .charis-menu-drawer__cta {
	display: flex;
	margin: var(--wp--preset--spacing--60) 0 0;
}

.charis-menu-drawer .charis-menu-drawer__cta .wp-block-button__link {
	background-color: var(--wp--preset--color--brand-red);
	color: var(--wp--preset--color--bg-white);
}

/* Sections land under the sticky header when reached from the menu. */
.charis-landing .charis-page__body--sections > [id] {
	scroll-margin-top: var(--charis-header-h, 76px);
}

/* Square full-width bands (the Group panels elsewhere are rounded). The
 * IL panel rule (pages.css) stacks :not() exclusions, so its specificity
 * cannot be met with classes alone. */
.charis-page .wp-block-post-content.charis-page__body--sections > .wp-block-group.charis-band {
	border-radius: 0 !important;
}

/* Section copy in Purple (Figma Body/M under the section headings). */
.charis-page--group-single .wp-block-charis-photo-cards.is-cards-white:not(.is-on-dark) .wp-block-charis-photo-cards__body {
	color: var(--wp--preset--color--brand-purple);
}

/* Hero: an inline text colour (e.g. Tangerine "Zero burden") has no fill. */
.wp-block-charis-hero__heading mark {
	background: none;
}

/* Footer — Figma "D / Footer - Group" without the menu columns: LinkedIn
 * stays in the last menu column (x 952). */
@media (min-width: 1024px) {

	.charis-footer--landing .charis-footer__nav-secondary {
		grid-column: 2;
	}
}

/* ==========================================================================
 * Sign in pages — Figma Group "Desktop / Sign in" (922-11337, 922-11606).
 * The block owns the page: no page header, a full-width grey band between
 * the header and the footer.
 * ======================================================================= */

.charis-page:has(.charis-page__body > :is(.wp-block-charis-sign-in-options, .wp-block-charis-login-form)) .charis-page-header {
	display: none;
}

.charis-page .wp-block-post-content.charis-page__body:has(> :is(.wp-block-charis-sign-in-options, .wp-block-charis-login-form)) {
	max-width: none;
	padding-block: 0;
	padding-inline: 0;
}

.charis-page .charis-page__body > :is(.wp-block-charis-sign-in-options, .wp-block-charis-login-form) {
	max-width: none;
	margin-block: 0;
	margin-inline: calc(50% - 50vw);
}

/* ==========================================================================
 * CharisConnect step pages (Engage, Assess, Design, Manage) — no Figma
 * frame: CharisConnect pieces. White "about" section (H2, the Big text
 * lead, Body/M text), grey "How … works." steps, white Connect map with the
 * current step pill in Indigo, Group calculator banner.
 * ======================================================================= */

.charis-step .charis-step__about > * + * {
	margin-top: var(--wp--preset--spacing--60);
}

.charis-step .charis-step__heading {
	margin-bottom: var(--wp--preset--spacing--70);
	color: var(--wp--preset--color--brand-indigo);
}

.charis-step .charis-step__body {
	max-width: 800px;
	color: var(--wp--preset--color--brand-indigo);
	font-size: var(--wp--preset--font-size--fs-body-m);
	font-weight: 300;
	letter-spacing: var(--wp--custom--charis--ls-body, 0.02em);
	line-height: 28px;
}

.charis-step > .charis-step__map {
	padding-block: var(--wp--preset--spacing--100);
}

@media (max-width: 767px) {

	.charis-step > .charis-step__map {
		padding-block: var(--wp--preset--spacing--90);
	}
}
