/* ============================================
   Legal page body-content styling.
   Applies only to the .berry-page-content wrapper injected by
   inc/legal-pages.php around the 6 legal pages' `the_content` output, plus
   the page title above it (tagged via body.berry-legal-page). Presentation
   only — see inc/legal-pages.php for why the content itself is untouched.
   Reuses the same design tokens as berry-reference.css (loaded first; this
   stylesheet depends on it for the --clr-*/--font-* custom properties, with
   literal fallbacks here in case it's ever missing).
   ============================================ */

.berry-page-content {
	max-width: 820px;
	margin: 0 auto;
	padding: 8px 24px 96px;
	font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
	color: var(--clr-text, #1a0a1e);
	font-size: 16px;
	line-height: 1.75;
}

.berry-page-content > *:first-child {
	margin-top: 0;
}

.berry-page-content h1,
.berry-page-content h2,
.berry-page-content h3,
.berry-page-content h4,
.berry-page-content h5,
.berry-page-content h6 {
	font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
	color: var(--clr-primary-dark, #7a2ed6);
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 2em 0 0.6em;
}

.berry-page-content h1 { font-size: clamp(26px, 4vw, 36px); }
.berry-page-content h2 { font-size: clamp(21px, 3vw, 26px); }
.berry-page-content h3 { font-size: 19px; }
.berry-page-content h4,
.berry-page-content h5,
.berry-page-content h6 { font-size: 16px; }

.berry-page-content p {
	margin: 0 0 1.1em;
	color: var(--clr-text, #1a0a1e);
}

.berry-page-content strong,
.berry-page-content b {
	color: var(--clr-text, #1a0a1e);
	font-weight: 700;
}

.berry-page-content em {
	color: var(--clr-text-muted, #5c4466);
}

.berry-page-content ul,
.berry-page-content ol {
	margin: 0 0 1.3em;
	padding-left: 1.4em;
	color: var(--clr-text, #1a0a1e);
}

.berry-page-content li {
	margin-bottom: 0.5em;
}

.berry-page-content li::marker {
	color: var(--clr-primary, #9c50ff);
}

.berry-page-content a {
	color: var(--clr-primary, #9c50ff);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.berry-page-content a:hover {
	color: var(--clr-primary-dark, #7a2ed6);
}

.berry-page-content hr {
	border: none;
	border-top: 1px solid var(--clr-border, rgba(0, 0, 0, 0.08));
	margin: 2.5em 0;
}

.berry-page-content blockquote {
	margin: 0 0 1.3em;
	padding: 0.75em 1.25em;
	border-left: 3px solid var(--clr-primary, #9c50ff);
	background: var(--clr-surface-2, #f2f0ec);
	color: var(--clr-text-muted, #5c4466);
	border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
}

.berry-page-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
	font-size: 14.5px;
}

.berry-page-content table th,
.berry-page-content table td {
	border: 1px solid var(--clr-border, rgba(0, 0, 0, 0.08));
	padding: 8px 12px;
	text-align: left;
}

.berry-page-content table th {
	background: var(--clr-surface-2, #f2f0ec);
	color: var(--clr-text, #1a0a1e);
	font-weight: 600;
}

/* Page title (core/post-title, rendered above .berry-page-content by the
   block-theme `page` template) — match the same typography/colour. */
body.berry-legal-page .wp-block-post-title {
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
	font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
	color: var(--clr-text, #1a0a1e);
	letter-spacing: -0.01em;
}

@media (max-width: 640px) {
	.berry-page-content {
		padding: 0 16px 64px;
	}
	body.berry-legal-page .wp-block-post-title {
		padding: 0 16px;
	}
}
