/*
 * Benefit - Pillars.
 *
 * Read from cp-all-designer benefit.html:116-229, css/benefit.css:141-241,
 * 258-266, 746-818.
 *
 * Colour, type, padding, the corners and the spaces between the parts arrive
 * from the Style tab and are not repeated here.
 */

.custom-benefit-pillars {
	--custom-benefit-pillars-inset: 10px;
	--custom-benefit-pillars-curl: 46px;
	--custom-benefit-pillars-icon: 46px;
	--custom-benefit-pillars-blue-tile: #EAF4FA;
	--custom-benefit-pillars-blue-ink: #50A3D5;
	--custom-benefit-pillars-blue-name: #16418C;
	--custom-benefit-pillars-red-tile: #FAEAEA;
	--custom-benefit-pillars-red-ink: #CE2929;
	--custom-benefit-pillars-red-name: #CE2929;
	--custom-benefit-pillars-green-tile: #EBF4E8;
	--custom-benefit-pillars-green-ink: #5CA13F;
	--custom-benefit-pillars-green-name: #16418C;
	--custom-benefit-pillars-navy-tile: #E8ECF4;
	--custom-benefit-pillars-navy-ink: #16418C;
	--custom-benefit-pillars-navy-name: #16418C;
}

/* benefit.css:258-260 — one screen, but no taller than the content needs on a
   tall one: the window's height up to 860px */
@media (min-width: 1025px) and (min-height: 860px) {
	.custom-benefit-pillars[data-custom-partner-screen] {
		min-height: 860px;
	}
}

/* benefit.css:229 — the line under the heading sits tighter on a desktop */
@media (min-width: 1025px) {
	.custom-benefit-pillars .custom-benefit-pillars__intro {
		line-height: 1.6;
	}
}

/* benefit.css:148-152 — five to a row */
.custom-benefit-pillars .custom-benefit-pillars__cards {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	grid-auto-rows: auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* benefit.css:160-171 — a white leaf over three shared row lines (tile ·
   paragraph · list), so the lists of a row start level */
.custom-benefit-pillars .custom-benefit-pillars__card {
	--custom-benefit-pillars-tile: var(--custom-benefit-pillars-blue-tile);
	--custom-benefit-pillars-ink: var(--custom-benefit-pillars-blue-ink);
	--custom-benefit-pillars-name: var(--custom-benefit-pillars-blue-name);
	display: grid;
	grid-row: span 3;
	grid-template-rows: subgrid;
	row-gap: 0;
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	padding: var(--custom-benefit-pillars-inset);
	border-radius: var(--custom-benefit-pillars-curl) 4px var(--custom-benefit-pillars-curl) 4px;
	box-shadow: 0 2px 6px rgba(22, 65, 140, 0.06), 0 12px 28px -12px rgba(22, 65, 140, 0.16);   /* --benf-sh, benefit.css:20 */
	list-style: none;
}

.custom-benefit-pillars .custom-benefit-pillars__card[data-tone="red"] {
	--custom-benefit-pillars-tile: var(--custom-benefit-pillars-red-tile);
	--custom-benefit-pillars-ink: var(--custom-benefit-pillars-red-ink);
	--custom-benefit-pillars-name: var(--custom-benefit-pillars-red-name);
}

.custom-benefit-pillars .custom-benefit-pillars__card[data-tone="green"] {
	--custom-benefit-pillars-tile: var(--custom-benefit-pillars-green-tile);
	--custom-benefit-pillars-ink: var(--custom-benefit-pillars-green-ink);
	--custom-benefit-pillars-name: var(--custom-benefit-pillars-green-name);
}

.custom-benefit-pillars .custom-benefit-pillars__card[data-tone="navy"] {
	--custom-benefit-pillars-tile: var(--custom-benefit-pillars-navy-tile);
	--custom-benefit-pillars-ink: var(--custom-benefit-pillars-navy-ink);
	--custom-benefit-pillars-name: var(--custom-benefit-pillars-navy-name);
}

/* benefit.css:174-180 — the pale tile, a leaf inside the leaf: its top corner
   is the card's less the card's padding, so the two curves run parallel */
.custom-benefit-pillars .custom-benefit-pillars__top {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	background-color: var(--custom-benefit-pillars-tile);
	border-radius: calc(var(--custom-benefit-pillars-curl) - var(--custom-benefit-pillars-inset)) 4px var(--custom-benefit-pillars-curl) 4px;
	text-align: center;
}

/* benefit.css:181-183 — two tones of the kind's colour: the back shape faint */
.custom-benefit-pillars .custom-benefit-pillars__icon {
	display: block;
	color: var(--custom-benefit-pillars-ink);
	line-height: 0;
}

.custom-benefit-pillars .custom-benefit-pillars__icon svg {
	display: block;
	width: var(--custom-benefit-pillars-icon);
	height: auto;
	fill: currentColor;
}

.custom-benefit-pillars .custom-benefit-pillars__icon i {
	font-size: var(--custom-benefit-pillars-icon);
}

.custom-benefit-pillars .custom-benefit-pillars__icon .t {
	opacity: 0.35;
}

/* benefit.css:184-187 */
.custom-benefit-pillars .custom-benefit-pillars__name {
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.custom-benefit-pillars .custom-benefit-pillars__card .custom-benefit-pillars__name {
	color: var(--custom-benefit-pillars-name);
}

/* benefit.css:188, 236 */
.custom-benefit-pillars .custom-benefit-pillars__tag {
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
}

.custom-benefit-pillars .nb {
	white-space: nowrap;
}

/* benefit.css:189-193 — the paragraph and the list take the card's other two row lines */
.custom-benefit-pillars .custom-benefit-pillars__body {
	display: grid;
	grid-row: span 2;
	grid-template-rows: subgrid;
	row-gap: 0;
	min-width: 0;
}

.custom-benefit-pillars .custom-benefit-pillars__text {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 300;
	line-height: 1.6;
	letter-spacing: 0;
	text-transform: none;
}

/* benefit.css:194-202 — a rule, then items each led by a dot in the kind's colour */
.custom-benefit-pillars .custom-benefit-pillars__list {
	display: grid;
	align-content: start;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
	border-top: 2px solid #EEF2F7;         /* benefit.css:194 measures 1px */
	list-style: none;
}

.custom-benefit-pillars .custom-benefit-pillars__item {
	position: relative;
	margin: 0;
	padding: 0 0 0 18px;
	font-family: inherit;
	font-style: normal;
	font-weight: 500;
	line-height: 1.55;
	letter-spacing: 0;
	text-transform: none;
	list-style: none;
}

.custom-benefit-pillars .custom-benefit-pillars__item::before {
	content: "";
	position: absolute;
	top: 8px;                              /* .55em: 7.7 at 14px, 8.8 at 16px */
	left: 2px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--custom-benefit-pillars-ink);
}

/* benefit.css:203-206 */
.custom-benefit-pillars .custom-benefit-pillars__note {
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0;
	text-transform: none;
}

/* ------------------------------------------------------------------ */
/* Tablet — 768px to 1024px (benefit.css:759-764, drawn below 1200)    */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	/* three to a row on six tracks, a card to two, so a short last row sits
	   centred: half a column in for two cards, a column for one */
	.custom-benefit-pillars .custom-benefit-pillars__cards {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
	.custom-benefit-pillars .custom-benefit-pillars__card {
		grid-column: span 2;
	}
	.custom-benefit-pillars .custom-benefit-pillars__card:nth-child(3n+1):nth-last-child(2) {
		grid-column: 2 / span 2;
	}
	.custom-benefit-pillars .custom-benefit-pillars__card:nth-child(3n+1):last-child {
		grid-column: 3 / span 2;
	}
	/* benefit.css:188 — the desktop's tighter lines are its own (benefit.css:236, 238) */
	.custom-benefit-pillars .custom-benefit-pillars__tag {
		line-height: 1.55;
	}
	.custom-benefit-pillars .custom-benefit-pillars__text {
		line-height: 1.75;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px (benefit.css:814-818, drawn below 560)         */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.custom-benefit-pillars .custom-benefit-pillars__cards {
		grid-template-columns: minmax(0, 1fr);
	}
	.custom-benefit-pillars .custom-benefit-pillars__card,
	.custom-benefit-pillars .custom-benefit-pillars__card:nth-child(3n+1):nth-last-child(2),
	.custom-benefit-pillars .custom-benefit-pillars__card:nth-child(3n+1):last-child {
		grid-column: auto;
	}
}
