/* ==========================================================================
   Legal page
   Figma: desktop 4015:338 / 4101:4915, tablet 4021:1828 / 4101:3562,
   mobile 4009:1954 / 4101:4182.
   One text block: heading and body share the same size; every block is
   separated by exactly one blank line (= one line-height).
   ========================================================================== */

.legal-page {
	/* Text block top at y=193; "Back to top" top at y=1707, block bottom at 1598. */
	padding: calc(193 * var(--u)) var(--gutter) calc(109 * var(--u)) calc(59 * var(--u));
}

.legal-content {
	width: calc(871 * var(--u));
	max-width: 100%;
	font-weight: 400;
	font-size: calc(20 * var(--u));
	line-height: calc(26 * var(--u));
	letter-spacing: -0.01em;
	color: var(--fg);
	overflow-wrap: break-word;
}

/* Every block ends with one empty line. */
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content p,
.legal-content ul,
.legal-content ol {
	margin: 0 0 calc(26 * var(--u));
	font-size: inherit;
	line-height: inherit;
}
.legal-content > :last-child {
	margin-bottom: 0;
}

/* Section headings are the body size in bold (Figma: 20/26 bold, -1%). */
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content strong,
.legal-content b {
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* Inline links: bold, underlined, same colour as the text in both schemes. */
.legal-content a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: from-font;
	text-underline-position: from-font;
	transition: opacity 0.2s var(--ease);
}
.legal-content a:hover {
	opacity: 0.6;
}

/* Lists (none in the design; dash bullets to match the rest of the site). */
.legal-content ul,
.legal-content ol {
	padding: 0;
	list-style: none;
}
.legal-content li {
	position: relative;
	padding-left: 1em;
}
.legal-content ul li::before {
	content: "–";
	position: absolute;
	left: 0;
}
.legal-content ol {
	counter-reset: legal-list;
}
.legal-content ol li {
	padding-left: 1.6em;
	counter-increment: legal-list;
}
.legal-content ol li::before {
	content: counter(legal-list) ".";
	position: absolute;
	left: 0;
}

/* Tables: hairline rules between rows, headings in bold, cells aligned with
   the text. (The selectors outrank the block's own bordered style.) */
.legal-content figure {
	margin: 0 0 calc(26 * var(--u));
	overflow-x: auto;
}
.legal-content figure table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}
.legal-content figure thead {
	border: 0;
}
.legal-content figure th,
.legal-content figure td {
	padding: calc(13 * var(--u)) calc(20 * var(--u)) calc(13 * var(--u)) 0;
	border: 0;
	border-top: 1px solid var(--fg);
	vertical-align: top;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.legal-content figure th {
	font-weight: 700;
}
.legal-content figure th:last-child,
.legal-content figure td:last-child {
	padding-right: 0;
}
.legal-content figure tr:last-child td {
	border-bottom: 1px solid var(--fg);
}

/* Tablet 768px: block at 60/191, 648 wide, 18/22; "Back to top" at y=1594. */
@media (min-width: 768px) and (max-width: 1023px) {
	.legal-page {
		padding: 191px 60px 34px;
	}
	.legal-content {
		width: 648px;
		font-size: 18px;
		line-height: 22px;
	}
	.legal-content h1,
	.legal-content h2,
	.legal-content h3,
	.legal-content h4,
	.legal-content p,
	.legal-content ul,
	.legal-content ol,
	.legal-content figure {
		margin-bottom: 22px;
	}
	.legal-content figure th,
	.legal-content figure td {
		padding: 11px 16px 11px 0;
	}
	.legal-content > :last-child {
		margin-bottom: 0;
	}
}

/* Mobile 390px: block at 30/172 (112 below the status bar), 331 wide, 16/19;
   "Back to top" at y=2097 (2037 on the page). */
@media (max-width: 767px) {
	.legal-page {
		padding: 112px 30px 115px;
	}
	.legal-content {
		width: 331px;
		font-size: 16px;
		line-height: 19px;
	}
	.legal-content h1,
	.legal-content h2,
	.legal-content h3,
	.legal-content h4,
	.legal-content p,
	.legal-content ul,
	.legal-content ol,
	.legal-content figure {
		margin-bottom: 19px;
	}
	.legal-content figure th,
	.legal-content figure td {
		padding: 9px 12px 9px 0;
	}
	.legal-content > :last-child {
		margin-bottom: 0;
	}
}
