/**
 * Default page template (page.php): padded section + .wysiwyg-content for editor content.
 * Containers are 100% wide with side padding: 20px mobile, 40px tablet, 8.333% from 1024.
 * Heading sizes come from the global tokens (set on the elements so style.css's h1 { 2em } can't win).
 */

.page-content {
	width: 100%;
	background-color: var(--color-white);
}

.page-content__inner {
	width: 100%;
	padding: 40px 20px;
	box-sizing: border-box;
}

/* Page title: the H1 of a default-template page (no hero block here). H1 tokens set on the class
   because style.css normalizes h1 to 2em.
   Responsive type: every heading uses the global tokens, which switch from the mobile scale to the
   desktop scale at 768px (h1 44/54 → 64/74, h2 38/48 → 44/54, h3 30/38 → 34/44, h4 24/32 → 28/38,
   h5 24/32 → 20/30); paragraph and h6 stay 16/24 per the type scale. */
.page-content__title {
	margin: 0 0 24px;
	color: var(--color-black);
	font-family: var(--font-h1-family);
	font-size: var(--font-h1-size);
	font-style: var(--font-h1-style);
	font-weight: var(--font-h1-weight);
	letter-spacing: var(--font-h1-tracking);
	line-height: var(--font-h1-line);
	text-transform: capitalize;
}

.wysiwyg-content {
	width: 100%;
	color: var(--color-text);
	font-family: var(--font-primary);
	font-size: var(--font-paragraph-size);
	font-weight: var(--font-paragraph-weight);
	letter-spacing: var(--font-paragraph-tracking);
	line-height: var(--font-paragraph-line);
}

/* Vertical rhythm (developer): space goes above each element, never below.
   Headings 32px; paragraphs, lists and other blocks 12px; nothing above a first child. */
.wysiwyg-content :is(h1, h2, h3, h4, h5, h6) {
	margin-top: 32px;
	margin-bottom: 0;
}

.wysiwyg-content :is(p, ul, ol),
.wysiwyg-content > :is(blockquote, table, figure, hr, .wp-block-image, .wp-block-table, .page-links) {
	margin-top: 12px;
	margin-bottom: 0;
}

.wysiwyg-content :first-child {
	margin-top: 0;
}

.wysiwyg-content h1 {
	font-family: var(--font-h1-family);
	font-size: var(--font-h1-size);
	font-style: var(--font-h1-style);
	font-weight: var(--font-h1-weight);
	letter-spacing: var(--font-h1-tracking);
	line-height: var(--font-h1-line);
}

.wysiwyg-content h2 {
	font-family: var(--font-h2-family);
	font-size: var(--font-h2-size);
	font-style: var(--font-h2-style);
	font-weight: var(--font-h2-weight);
	letter-spacing: var(--font-h2-tracking);
	line-height: var(--font-h2-line);
}

.wysiwyg-content h3 {
	font-family: var(--font-h3-family);
	font-size: var(--font-h3-size);
	font-style: var(--font-h3-style);
	font-weight: var(--font-h3-weight);
	letter-spacing: var(--font-h3-tracking);
	line-height: var(--font-h3-line);
}

.wysiwyg-content h4 {
	font-family: var(--font-h4-family);
	font-size: var(--font-h4-size);
	font-style: var(--font-h4-style);
	font-weight: var(--font-h4-weight);
	letter-spacing: var(--font-h4-tracking);
	line-height: var(--font-h4-line);
}

.wysiwyg-content h5 {
	font-family: var(--font-h5-family);
	font-size: var(--font-h5-size);
	font-style: var(--font-h5-style);
	font-weight: var(--font-h5-weight);
	letter-spacing: var(--font-h5-tracking);
	line-height: var(--font-h5-line);
}

.wysiwyg-content h6 {
	font-size: var(--font-h6-size);
	font-weight: var(--font-h6-weight);
	letter-spacing: var(--font-h6-tracking);
	line-height: var(--font-h6-line);
}

.wysiwyg-content ul,
.wysiwyg-content ol {
	padding-left: 24px;
}

/* No left margin on bullet lists (style.css gives ul 3em / nested 1.5em); the 24px padding keeps the bullets inside. */
.wysiwyg-content ul {
	margin-left: 0;
}

.wysiwyg-content li + li {
	margin-top: 8px;
}

/* Rule #24: visited links look the same as unvisited; hover keeps the colour, thicker underline. */
.wysiwyg-content a,
.wysiwyg-content a:visited,
.wysiwyg-content a:hover,
.wysiwyg-content a:focus,
.wysiwyg-content a:active {
	color: var(--color-teal);
	text-decoration: underline;
}

.wysiwyg-content a:hover,
.wysiwyg-content a:focus {
	text-decoration-thickness: 2px;
}

.wysiwyg-content strong,
.wysiwyg-content b {
	font-weight: var(--font-weight-bold);
}

.wysiwyg-content img,
.wysiwyg-content video,
.wysiwyg-content iframe {
	max-width: 100%;
	height: auto;
}

.wysiwyg-content blockquote {
	padding: 12px 16px;
	border-left: 4px solid var(--color-bright-green);
	background-color: var(--color-grey-100);
}

.wysiwyg-content table {
	width: 100%;
	border-collapse: collapse;
}

.wysiwyg-content th,
.wysiwyg-content td {
	padding: 8px 12px;
	border: 1px solid var(--color-grey-300);
	text-align: left;
}

@media (min-width: 768px) {
	.page-content__inner {
		padding: 64px 40px;
	}

	.page-content__title {
		margin-bottom: 40px;
	}
}

@media (min-width: 1024px) {
	.page-content__inner {
		padding: 80px 8.333%;
	}
}
