/* =============================================================================
   EM3 Legal pages (Privacy, Cookie, Terms of Use, Business Partner CoC).
   A compact dark hero + a clean, readable white prose body. The body is the
   normal editor content; markup contract: theme/inc/legal.php.
   ========================================================================== */

/* ---- Hero (compact, dark) ------------------------------------------------- */
.em3-legal-hero {
	padding: clamp(150px, 16vh, 200px) 0 clamp(40px, 5vw, 60px);
}
.em3-legal-hero .em3-res-breadcrumb,
.em3-legal-hero .em3-breadcrumb {
	margin-bottom: 18px;
}
.em3-legal-hero__eyebrow {
	display: inline-block;
	margin-bottom: 14px;
}
.em3-legal-hero__title {
	margin: 0;
	font-size: clamp(32px, 4vw, 50px);
	line-height: 1.08;
	color: var(--em3-ink);
}
.em3-legal-hero__meta {
	margin: 18px 0 0;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.6);
}

/* ---- Body + prose --------------------------------------------------------- */
.em3-legal-body {
	padding-top: clamp(48px, 6vw, 76px);
	padding-bottom: clamp(60px, 8vw, 100px);
}
.em3-legal-prose {
	max-width: 840px;
	margin: 0 auto;
	color: var(--em3-charcoal, #303a4d);
	font-size: 16.5px;
	line-height: 1.72;
}
.em3-legal-prose > *:first-child {
	margin-top: 0;
}
.em3-legal-prose p {
	margin: 0 0 1.15em;
}
.em3-legal-prose h2 {
	margin: 1.9em 0 0.6em;
	font-size: clamp(24px, 2.4vw, 31px);
	line-height: 1.18;
	color: var(--em3-ink-navy);
	letter-spacing: -0.01em;
}
.em3-legal-prose h3 {
	margin: 1.6em 0 0.5em;
	font-size: clamp(19px, 1.7vw, 22px);
	line-height: 1.25;
	color: var(--em3-ink-navy);
}
.em3-legal-prose h4 {
	margin: 1.4em 0 0.45em;
	font-size: 17px;
	font-weight: 700;
	color: var(--em3-ink-navy);
}
.em3-legal-prose h2:first-child,
.em3-legal-prose h3:first-child {
	margin-top: 0;
}
.em3-legal-prose strong { color: var(--em3-ink-navy); font-weight: 700; }
.em3-legal-prose a {
	color: var(--em3-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.em3-legal-prose a:hover,
.em3-legal-prose a:focus { color: var(--em3-accent-hot); }

/* lists */
.em3-legal-prose ul,
.em3-legal-prose ol {
	margin: 0 0 1.15em;
	padding-left: 1.4em;
}
.em3-legal-prose li { margin: 0 0 0.5em; padding-left: 0.2em; }
.em3-legal-prose ul > li::marker { color: var(--em3-accent); }
.em3-legal-prose ol > li::marker { color: var(--em3-accent); font-weight: 700; }

/* a labelled meta line (cookie name + "Domain name: ... Expiration: ...") reads
   cleanly when wrapped in <em>; keep it muted + tight under the bold name. */
.em3-legal-prose em { color: rgba(48, 58, 77, 0.86); font-style: italic; }

/* tables (e.g. cookie tables, if the content uses them) */
.em3-legal-prose .wp-block-table,
.em3-legal-prose figure.wp-block-table { margin: 0 0 1.4em; overflow-x: auto; }
.em3-legal-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
	border: 1px solid var(--em3-line-onwhite, #e7ebf3);
	border-radius: var(--em3-radius-card);
	overflow: hidden;
}
.em3-legal-prose th,
.em3-legal-prose td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--em3-line-onwhite, #e7ebf3);
	text-align: left;
	vertical-align: top;
}
.em3-legal-prose thead th {
	background: #f3f6fc;
	color: var(--em3-ink-navy);
	font-weight: 700;
	letter-spacing: 0.01em;
}
.em3-legal-prose tbody tr:last-child td { border-bottom: 0; }

/* a soft divider between long cookie/clause blocks */
.em3-legal-prose hr {
	margin: 1.8em 0;
	border: 0;
	height: 1px;
	background: var(--em3-line-onwhite, #e7ebf3);
}

/* ---- Layout: sticky "On this page" TOC + prose (desktop) ----------------- */
.em3-legal-layout {
	display: grid;
	grid-template-columns: minmax(0, 212px) minmax(0, 1fr);
	gap: clamp(40px, 5vw, 72px);
	align-items: start;
}
.em3-legal-layout--notoc {
	grid-template-columns: 1fr;
}
.em3-legal-layout .em3-legal-prose {
	max-width: 800px;
	margin: 0;
}
.em3-legal-layout--notoc .em3-legal-prose {
	max-width: 840px;
	margin: 0 auto;
}

.em3-legal-toc {
	position: sticky;
	top: 108px;
}
.em3-legal-toc__label {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--em3-accent);
}
.em3-legal-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--em3-line-onwhite, #e7ebf3);
}
.em3-legal-toc__list li { margin: 0; }
.em3-legal-toc__list a {
	display: block;
	padding: 7px 0 7px 16px;
	margin-left: -1px;
	border-left: 2px solid transparent;
	font-size: 13.5px;
	line-height: 1.4;
	color: rgba(48, 58, 77, 0.78);
	text-decoration: none;
	transition: color 0.2s, border-color 0.2s;
}
.em3-legal-toc__list a:hover,
.em3-legal-toc__list a:focus {
	color: var(--em3-accent);
	border-left-color: var(--em3-accent);
}

/* ---- Prose polish: h2 accent bar + heading anchor offset + cookie meta --- */
.em3-legal-prose h2 {
	scroll-margin-top: 104px;
}
.em3-legal-prose h2::before {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	margin-bottom: 16px;
	background: linear-gradient(90deg, var(--em3-accent), var(--em3-accent-hot));
	border-radius: 2px;
}
/* the cookie "Domain name: ... Expiration: ..." meta line, tagged in the renderer */
.em3-legal-prose .em3-legal-meta {
	margin: -0.15em 0 0.55em;
	font-size: 13px;
	letter-spacing: 0.01em;
	color: rgba(48, 58, 77, 0.6);
}
/* cookie name headings sit tighter to their meta line */
.em3-legal-prose h4 + .em3-legal-meta { margin-top: 0.1em; }

@media (max-width: 900px) {
	.em3-legal-layout {
		grid-template-columns: 1fr;
	}
	.em3-legal-toc {
		display: none;
	}
	.em3-legal-layout .em3-legal-prose {
		max-width: 100%;
	}
}

@media (max-width: 600px) {
	.em3-legal-prose { font-size: 16px; }
}
