/*
 * Legal - Document.
 *
 * Read from cp-all-designer css/legal.css:1-75 (.lglbrand, .lglbody,
 * .lglbody__n, .lglcard), css/app.css:230-252 (.h-sec), 291-294 (.lead) and
 * 404-408 (.sec__head).
 *
 * What the Style tab sets is not repeated here: the band's ground and
 * padding, widths, colours, sizes and spacing arrive through the widget's own
 * selectors, most of them as custom properties the rules below read.
 *
 * Tiers: mobile up to 767px, tablet 768-1024px, desktop 1025px and up.
 */

.custom-legal-document {
	position: relative;
	display: block;
	box-sizing: border-box;
}

.custom-legal-document__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1920px;                     /* the content cap, every band */
	margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* The head                                                            */
/* ------------------------------------------------------------------ */

.custom-legal-document__head {
	margin-left: auto;
	margin-right: auto;
}

/* legal.css:3-4 */
.custom-legal-document__logo {
	display: inline-flex;
}

.custom-legal-document__logo img {
	display: block;
	width: auto;
	max-width: 100%;
}

/* app.css:230-237 */
.custom-legal-document__title {
	margin: 0;
	padding: 0;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}

.custom-legal-document__title strong {
	font-weight: 700;
}

/* app.css:246-252 — the highlighted part, with the soft bar under it */
.custom-legal-document__title em {
	position: relative;
	display: inline-block;
	font-style: italic;
	font-weight: 700;
}

.custom-legal-document__title em::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.06em;
	height: 0.16em;
	border-radius: 3px;
	background: currentColor;
	opacity: 0.18;
}

.custom-legal-document [data-custom-sweep-ghost] em::after {
	opacity: 0.12;                         /* app.css:275 */
}

/*
 * app.css:291-294 — the design gives the lead a measure and no auto margin,
 * so in a centred head it stands from the head's left edge with its words
 * centred inside it.
 */
.custom-legal-document__intro {
	margin-bottom: 0;
	font-weight: 400;
	line-height: 1.7;
}

/* ------------------------------------------------------------------ */
/* The text — legal.css:9-63                                           */
/* ------------------------------------------------------------------ */

.custom-legal-document__body {
	min-width: 0;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.custom-legal-document__body p {
	margin: 0 0 var(--custom-legal-para, 14px);
	font-size: var(--custom-legal-size, 16px);
	line-height: 1.8;
	color: var(--custom-legal-ink, #475569);
}

.custom-legal-document__body ul,
.custom-legal-document__body ol {
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
	padding-left: 22px;
}

.custom-legal-document__body li {
	font-size: var(--custom-legal-size, 16px);
	line-height: 1.8;
	color: var(--custom-legal-ink, #475569);
}

.custom-legal-document__body li::marker {
	font-weight: 600;
}

.custom-legal-document__body b,
.custom-legal-document__body strong {
	font-weight: 600;
}

.custom-legal-document__body a {
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.18s;
}

/* legal.css:40-46 — the number sits in its badge beside the words */
.custom-legal-document__body h3 {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: var(--custom-legal-h3-above, 60px) 0 18px;
	padding: 0;
	font-weight: 600;
	line-height: 1.4;
	scroll-margin-top: 114px;
}

.custom-legal-document__body > h3:first-child {
	margin-top: 0;                         /* legal.css:97 */
}

.custom-legal-document__body h4 {
	margin: 32px 0 10px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.45;
}

/* legal.css:87-94 */
.custom-legal-document__n {
	display: inline-grid;
	flex: none;
	place-items: center;
	box-sizing: border-box;
	min-width: 36px;
	height: 36px;
	margin-top: 2px;
	padding: 0 10px;
	border-radius: 999px;
	background: linear-gradient(158deg, var(--custom-legal-badge-a, #50A3D5), var(--custom-legal-badge-b, #16418C));
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

/* the essay — legal.css:5-8: the first paragraph leads, the rest breathe */
.custom-legal-document--essay-yes .custom-legal-document__body p {
	margin-bottom: var(--custom-legal-essay, 30px);
}

/* :first-of-type in the design reaches the box's first paragraph too */
.custom-legal-document--essay-yes .custom-legal-document__body > p:first-child,
.custom-legal-document--essay-yes .custom-legal-document__box > p:first-child {
	font-size: 18px;
	line-height: 1.85;
	color: var(--custom-legal-first, #16418C);
}

/* the box — legal.css:66-74 */
.custom-legal-document__box {
	box-sizing: border-box;
	border: 1px solid rgba(22, 65, 140, 0.1);
	background: linear-gradient(158deg, var(--custom-legal-box-a, #F0F9FD), var(--custom-legal-box-b, #FFFFFF));
}

.custom-legal-document__box > :last-child,
.custom-legal-document--essay-yes .custom-legal-document__box p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Tablet and down                                                     */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.custom-legal-document__body h3 {
		scroll-margin-top: 102px;          /* --header-h 78 + 24 */
	}
	.custom-legal-document__body h4 {
		font-size: 16px;                   /* clamp(16, 1.4*9.2, 20) */
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.custom-legal-document__intro {
		line-height: 1.5;                  /* app.css:3016 */
	}
}
