/*
 * Static pages (templates/page.html) and the page patterns (About, Contact).
 * Loaded on the front end and in the editor.
 *
 *   .bl-page-head        <header> above the content; a Section, so it carries
 *                        the page's first spine marker (centred on the label)
 *   .bl-page-label       the page title, shown as the small rust label; it
 *                        always matches the page's name in the menu
 *   .is-style-facts      Table block style "Facts": label / value rows between
 *                        hairlines; stacks below 820px
 *   .bl-portrait         About: the portrait image, 240px (180px on mobile)
 *   .bl-notice           Contact: small sans notes; --crisis adds a rule above
 *
 * The H1 on a page comes from the Page intro pattern (or the About / Contact
 * layout), 22px below the label.
 */

/* Page head */
.bl-page-head {
	--bl-pt: 72px;
	padding-top: var(--bl-pt);
	padding-bottom: 22px;
}

/* No-JS spine estimate: half the label's 18px line (spine.js measures it) */
.is-style-section.bl-page-head {
	--bl-mk-c: 9px;
}

.bl-page-head + .wp-block-post-content {
	margin-block-start: 0;
}

.bl-page-label {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	letter-spacing: 0.16em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-text);
}

/* Facts: label / value rows (the original design's definition list) */
.wp-block-table.is-style-facts {
	margin-block-start: 48px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.wp-block-table.is-style-facts table {
	width: 100%;
	border-collapse: collapse;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.wp-block-table.is-style-facts td {
	padding: 15px 0 16px;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	vertical-align: top;
	text-align: left;
	color: var(--wp--preset--color--contrast);
}

.wp-block-table.is-style-facts td:first-child {
	width: 190px;
	padding-right: 16px;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--muted);
}

.wp-block-table.is-style-facts a {
	color: var(--wp--preset--color--accent-text);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--hairline);
	text-underline-offset: 4px;
}

.wp-block-table.is-style-facts a:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration-color: var(--wp--custom--color--accent);
}

/* Directly under a section heading: the usual heading-to-text gap */
.is-style-section > h2 + .wp-block-table.is-style-facts {
	margin-block-start: 32px;
}

/* Portrait */
.wp-block-image.bl-portrait img {
	display: block;
	width: 240px;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* Contact notes */
.bl-notice {
	margin-block-start: 28px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

.bl-notice--crisis {
	margin-block-start: 32px;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	color: var(--wp--preset--color--contrast);
}

@media (max-width: 820px) {
	.bl-page-head {
		--bl-pt: 48px;
	}

	.wp-block-table.is-style-facts tr,
	.wp-block-table.is-style-facts td {
		display: block;
	}

	.wp-block-table.is-style-facts td:first-child {
		width: auto;
		padding: 15px 0 0;
		border-bottom: 0;
	}

	.wp-block-table.is-style-facts td + td {
		padding-top: 4px;
	}

	.wp-block-image.bl-portrait img {
		width: 180px;
	}

	.is-style-section > h2 + .wp-block-table.is-style-facts {
		margin-block-start: 24px;
	}
}
