/**
 * Generic content page — legal / long-form pages (Privacy Policy, Terms of Use,
 * and any other Page that renders the_content() through page.php).
 *
 * The pricing page has its own template (page-pricing.php) and is excluded from
 * this stylesheet (see inc/setup/enqueue.php). This file owns ONLY the default
 * page.php surface: a centred reading column under the fixed top bar, with the
 * same typography scale as the Field Notes article body so prose, headings,
 * lists, tables, and the table-of-contents read like the rest of the site.
 *
 * Mirrors the .kodlo-note__content scale in fieldnotes.css. Lengths are plain
 * px (not --kodlo-px scaled) — legal text is a reading surface, not a 1:1 Figma
 * section, so it should stay legible rather than shrink with the canvas.
 */

.kodlo-page {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
	/* Clear the fixed top bar (42px offset + 42px bar) plus breathing room so the
	   page title never collides with the floating logo / nav. */
	padding: 140px 24px 120px;
	min-height: 60vh;
}

.kodlo-page__article {
	max-width: 760px;
	margin: 0 auto;
}

/* ---------- Page header ---------- */
.kodlo-page__header {
	margin-bottom: 48px;
	padding-bottom: 32px;
	border-bottom: 0.8px solid rgba(10, 10, 10, 0.15);
}

.kodlo-page__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(40px, 5vw, 64px);
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: var(--wp--preset--color--primary);
}

/* ===========================================================================
 * Content body — the_content() inside the 760px reading column.
 * Same scale as .kodlo-note__content (fieldnotes.css) so the whole site reads
 * with one long-form voice.
 * ======================================================================== */
.kodlo-page__content {
	font-family: var(--wp--preset--font-family--body);
}

.kodlo-page__content > * {
	margin-top: 0;
	margin-bottom: 0;
}

.kodlo-page__content > * + * {
	margin-top: 24px;
}

.kodlo-page__content p {
	font-size: 16px;
	line-height: 1.65;
	color: rgba(10, 10, 10, 0.78);
}

.kodlo-page__content h1,
.kodlo-page__content h2 {
	margin-top: 56px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: 28.8px;
	line-height: 1.08;
	letter-spacing: -0.025em;
	color: var(--wp--preset--color--primary);
	scroll-margin-top: 110px; /* anchor jumps clear the fixed bar */
}

.kodlo-page__content h3 {
	margin-top: 40px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: 20px;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--primary);
	scroll-margin-top: 110px;
}

.kodlo-page__content h4 {
	margin-top: 32px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: rgba(10, 10, 10, 0.78);
}

.kodlo-page__content a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 0.8px;
	text-decoration-color: rgba(10, 10, 10, 0.4);
	transition: text-decoration-color 0.2s ease;
}
.kodlo-page__content a:hover {
	text-decoration-color: var(--wp--preset--color--primary);
}

.kodlo-page__content ul,
.kodlo-page__content ol {
	margin: 0;
	padding-left: 1.3em;
	font-size: 16px;
	line-height: 1.65;
	color: rgba(10, 10, 10, 0.78);
}

.kodlo-page__content li + li {
	margin-top: 10px;
}

.kodlo-page__content li::marker {
	color: rgba(10, 10, 10, 0.45);
}

.kodlo-page__content strong {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

.kodlo-page__content blockquote {
	margin: 0;
	padding-left: 20px;
	border-left: 2px solid rgba(10, 10, 10, 0.2);
	font-family: var(--wp--preset--font-family--body);
	font-size: 20px;
	line-height: 1.45;
	color: rgba(10, 10, 10, 0.82);
}

.kodlo-page__content hr,
.kodlo-page__content .wp-block-separator {
	margin: 48px auto;
	border: 0;
	border-top: 0.8px solid rgba(10, 10, 10, 0.15);
}

.kodlo-page__content img,
.kodlo-page__content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Table of contents (heading-link list pasted into the body) ----------
 * Rank Math / pasted TOC blocks render as nested <ul>/<ol> of in-page anchors.
 * Give them a quiet panel so they read as navigation, not body copy. */
.kodlo-page__content > ul:first-child,
.kodlo-page__content .wp-block-list.kodlo-page-toc {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	letter-spacing: 0.02em;
}

/* ---------- Tables ---------- */
.kodlo-page__content table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
}
.kodlo-page__content th,
.kodlo-page__content td {
	text-align: left;
	padding: 12px 8px;
	border-bottom: 0.8px solid rgba(10, 10, 10, 0.15);
	letter-spacing: 0.04em;
	color: rgba(10, 10, 10, 0.8);
}
.kodlo-page__content th {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(10, 10, 10, 0.6);
	font-weight: 400;
}

@media (max-width: 767.98px) {
	.kodlo-page {
		padding: 110px 20px 80px;
	}
	.kodlo-page__title {
		font-size: 34px;
	}
	.kodlo-page__content h1,
	.kodlo-page__content h2 {
		font-size: 24px;
	}
	.kodlo-page__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
