/**
 * Fontrova - long-form page layer
 *
 * About, Contact, Privacy, Terms and Cookies are Gutenberg pages rather than
 * Elementor documents, so they never picked up the type scale the built pages
 * use. Left alone they render at Astra's defaults: a 21px h2 under a 52px h1,
 * body copy painted in the muted meta colour, and no rhythm between sections.
 *
 * This sheet gives them the same scale, spacing and section structure as the
 * rest of the site, one step quieter. Everything resolves through the design
 * tokens, so dark mode follows without a second set of rules.
 */

/* ---------------------------------------------------------------- type scale */

body.fds-utility-page .entry-content {
	color: var( --fds-foreground );
	font-size: 17px;
	line-height: 1.75;
}

body.fds-utility-page .entry-content > p {
	color: var( --fds-foreground );
	margin: 0 0 20px;
}

/* The opening paragraph carries the page. Slightly larger, a little tighter. */
body.fds-utility-page .entry-content > p:first-of-type,
body.fds-utility-page .entry-content > p.is-style-lead {
	font-size: 19px;
	line-height: 1.65;
	margin-bottom: 28px;
}

body.fds-utility-page .entry-content h2 {
	font-family: var( --fds-stack-heading );
	font-size: clamp( 25px, 2.4vw, 30px );
	line-height: 1.25;
	font-weight: 400;
	color: var( --fds-foreground );
	margin: 0 0 14px;
	padding-top: 40px;
	border-top: 1px solid var( --fds-border );
}

/* The first section rule would sit immediately under the lead and read as a
   stray line, so it starts clean. */
body.fds-utility-page .entry-content h2:first-of-type {
	border-top: 0;
	padding-top: 8px;
}

body.fds-utility-page .entry-content h3 {
	font-family: var( --fds-stack-body );
	font-size: 18px;
	line-height: 1.4;
	font-weight: 700;
	color: var( --fds-foreground );
	margin: 28px 0 10px;
}

/* ------------------------------------------------------------------- content */

body.fds-utility-page .entry-content ul,
body.fds-utility-page .entry-content ol {
	margin: 0 0 22px;
	padding-left: 22px;
}

body.fds-utility-page .entry-content li {
	color: var( --fds-foreground );
	margin-bottom: 8px;
	padding-left: 4px;
}

body.fds-utility-page .entry-content li::marker {
	color: var( --fds-accent );
}

body.fds-utility-page .entry-content strong {
	font-weight: 600;
	color: var( --fds-foreground );
}

body.fds-utility-page .entry-content :is( p, li ) a {
	color: var( --fds-accent-text );
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix( in srgb, var( --fds-accent-text ) 40%, transparent );
	transition: text-decoration-color 160ms var( --fds-ease );
}

body.fds-utility-page .entry-content :is( p, li ) a:hover {
	text-decoration-color: currentColor;
}

/* The "Last updated" line on the legal pages. It is meta, not prose. */
body.fds-utility-page .entry-content p em:only-child {
	display: inline-block;
	font-family: var( --fds-stack-mono );
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-style: normal;
	color: var( --fds-muted-foreground );
}

body.fds-utility-page .entry-content blockquote {
	margin: 0 0 24px;
	padding: 18px 22px;
	border: 0;
	border-left: 3px solid var( --fds-accent );
	border-radius: 0 var( --fds-radius-md ) var( --fds-radius-md ) 0;
	background: var( --fds-muted );
	color: var( --fds-foreground );
}

body.fds-utility-page .entry-content blockquote p:last-child {
	margin-bottom: 0;
}

body.fds-utility-page .entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 24px;
	font-size: 15px;
}

body.fds-utility-page .entry-content :is( th, td ) {
	border: 1px solid var( --fds-border );
	padding: 10px 14px;
	text-align: left;
	color: var( --fds-foreground );
}

body.fds-utility-page .entry-content th {
	background: var( --fds-muted );
	font-weight: 600;
}

/* -------------------------------------------------------------- narrow width */

@media ( max-width: 782px ) {
	body.fds-utility-page .entry-content {
		font-size: 16px;
	}

	body.fds-utility-page .entry-content > p:first-of-type,
	body.fds-utility-page .entry-content > p.is-style-lead {
		font-size: 17.5px;
	}

	body.fds-utility-page .entry-content h2 {
		padding-top: 32px;
	}
}
/* ------------------------------------------------------------------- column */

/* The Customizer sheet used to own the column for every interior page and set
 * its prose type at the same time. Those two jobs are now separated: it keeps
 * the blog and archive column, this owns the utility pages end to end.
 */
body.fds-utility-page .entry-content {
	max-width: 720px;
	margin-inline: auto;
	padding: 24px 24px 32px;
}

@media ( max-width: 782px ) {
	body.fds-utility-page .entry-content {
		padding: 16px 16px 32px;
	}
}

/* -------------------------------------------------------------- contact form */

/* The form shipped placeholder-only, so its labels vanished the moment you
 * started typing and screen readers had nothing to announce. Real labels now,
 * on the same rhythm as the prose around them. */
body.fds-utility-page .cf-row {
	margin-bottom: 18px;
}
body.fds-utility-page .cf-label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var( --fds-foreground );
}
body.fds-utility-page .cf-hint {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: var( --fds-muted-foreground );
}
body.fds-utility-page .wpcf7 input[type="text"],
body.fds-utility-page .wpcf7 input[type="email"],
body.fds-utility-page .wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid var( --fds-border );
	border-radius: var( --fds-radius-md );
	background: var( --fds-card );
	color: var( --fds-foreground );
	font-family: var( --fds-stack-body );
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 160ms var( --fds-ease ), box-shadow 160ms var( --fds-ease );
}
body.fds-utility-page .wpcf7 textarea {
	min-height: 160px;
	resize: vertical;
}
body.fds-utility-page .wpcf7 input::placeholder,
body.fds-utility-page .wpcf7 textarea::placeholder {
	color: var( --fds-muted-foreground );
	opacity: 1;
}
body.fds-utility-page .wpcf7 input:focus,
body.fds-utility-page .wpcf7 textarea:focus {
	outline: none;
	border-color: var( --fds-accent );
	box-shadow: 0 0 0 3px var( --fds-accent-tint );
}
body.fds-utility-page .wpcf7 input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 26px;
	border: 0;
	border-radius: var( --fds-radius-pill );
	background: var( --fds-accent );
	color: #fff;
	font-family: var( --fds-stack-body );
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 160ms var( --fds-ease ), transform 160ms var( --fds-ease );
}
body.fds-utility-page .wpcf7 input[type="submit"]:hover {
	background: var( --fds-accent-secondary );
}
body.fds-utility-page .wpcf7 input[type="submit"]:active {
	transform: translateY( 1px );
}
body.fds-utility-page .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 13px;
	color: #dc2626;
}
body.fds-utility-page .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border: 1px solid var( --fds-border );
	border-radius: var( --fds-radius-md );
	background: var( --fds-muted );
	color: var( --fds-foreground );
	font-size: 14.5px;
}

/* ----------------------------------------------------------------- skip link */

/* Astra paints the skip link in raw accent blue, which lands at 3.26:1 on the
 * dark background. It is a keyboard-only control, so it has to be legible the
 * one time anybody sees it. */
.skip-link,
.skip-link:focus {
	color: var( --fds-accent-text );
}
