/**
 * JSD Editorial Page
 *
 * The masthead and body type for JSD's written pages. Same black-and-white
 * system as the rest of the site, but tuned for reading rather than scanning:
 * a narrow measure, a real type hierarchy, and almost no furniture.
 *
 * Loaded by the jsd/page-header block, so it only reaches pages that use it.
 */

/* Masthead --------------------------------------------------------------- */

.jsd-page-header {
	padding: 72px 24px 40px;
	border-bottom: 1px solid #e5e5e5;
	background: #ffffff;
}

/*
 * The masthead takes the same 720px measure as the body copy rather than the
 * 1280px site container. On a written page the headline and the first
 * paragraph reading off one left edge is the whole point; a wide masthead over
 * a narrow column just looks like two unrelated layouts stacked.
 */
.jsd-page-header__inner {
	max-width: 720px;
	margin: 0 auto;
}

/*
 * Archive variant. A deal archive is a merchandising surface, not a written
 * page: its headline sits over the same 1280px column the card grid uses, so
 * the two share a left edge, and it runs shorter so an archive masthead never
 * competes with the homepage hero.
 */
.jsd-page-header--wide .jsd-page-header__inner {
	max-width: 1280px;
}

.jsd-page-header--compact {
	padding-top: 48px;
	padding-bottom: 28px;
}

/*
 * Written at three classes so these land whichever order the rules end up in:
 * the base title and standfirst rules below are themselves two classes deep.
 */
.jsd-page-header.jsd-page-header--compact .jsd-page-header__title {
	max-width: 24ch;
	font-size: clamp(2rem, 3.6vw, 2.75rem);
}

.jsd-page-header.jsd-page-header--compact .jsd-page-header__standfirst {
	margin-top: 18px;
	font-size: clamp(1rem, 1.3vw, 1.125rem);
}

.jsd-page-header .jsd-page-header__eyebrow {
	margin: 0 0 18px;
	color: #767676;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.jsd-page-header .jsd-page-header__title {
	max-width: 20ch;
	margin: 0;
	color: #000000;
	font-size: clamp(2.25rem, 4.4vw, 3.25rem);
	font-weight: 800;
	line-height: 1.03;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}

.jsd-page-header .jsd-page-header__standfirst {
	max-width: 62ch;
	margin: 26px 0 0;
	color: #333333;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	line-height: 1.55;
}

.jsd-page-header .jsd-page-header__updated {
	margin: 24px 0 0;
	color: #a8a8a8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

/* Body ------------------------------------------------------------------- */

/*
 * Everything in the prose column takes the same measure, so headings,
 * paragraphs and lists all sit on one left edge without the theme's own
 * content-width rules having to agree with us.
 *
 * Two levels are addressed throughout: a core group renders an
 * `__inner-container` wrapper in some layout modes and not in others, so each
 * rule covers both the direct child and the wrapped child. Selecting on both
 * keeps the page identical whichever way the block is saved.
 */
.jsd-prose {
	padding: 56px 24px 96px;
	background: #ffffff;
}

/*
 * Kadence zeroes horizontal padding on `.entry-content .alignfull`, which the
 * prose group carries so its white ground runs edge to edge. That rule is two
 * classes deep, so the gutter is restated here at three to win on specificity
 * rather than on source order. Without it the body copy touches the viewport
 * edge on any screen narrower than the 720px measure.
 */
.jsd-prose.jsd-prose.jsd-prose {
	padding-left: 24px;
	padding-right: 24px;
}

.jsd-prose > *,
.jsd-prose > .wp-block-group__inner-container > * {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.jsd-prose > h2,
.jsd-prose > .wp-block-group__inner-container > h2 {
	max-width: 720px;
	margin: 56px auto 16px;
	color: #000000;
	font-size: clamp(1.375rem, 2.2vw, 1.75rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-transform: uppercase;
}

.jsd-prose > h2:first-child,
.jsd-prose > .wp-block-group__inner-container > h2:first-child {
	margin-top: 0;
}

.jsd-prose > h3,
.jsd-prose > .wp-block-group__inner-container > h3 {
	max-width: 720px;
	margin: 36px auto 10px;
	color: #111111;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.jsd-prose > p,
.jsd-prose > .wp-block-group__inner-container > p {
	margin: 0 auto 18px;
	color: #333333;
	font-size: 1rem;
	line-height: 1.7;
}

.jsd-prose > ul,
.jsd-prose > ol,
.jsd-prose > .wp-block-group__inner-container > ul,
.jsd-prose > .wp-block-group__inner-container > ol {
	margin: 0 auto 22px;
	padding-left: 22px;
	color: #333333;
	font-size: 1rem;
	line-height: 1.7;
}

.jsd-prose li {
	margin: 0 0 7px;
}

.jsd-prose li::marker {
	color: #a8a8a8;
}

.jsd-prose a {
	color: #111111;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.jsd-prose a:hover {
	color: #000000;
	text-decoration-thickness: 2px;
}

.jsd-prose a:focus-visible {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.jsd-prose strong {
	color: #111111;
	font-weight: 700;
}

/*
 * A separator between major parts of a long legal page. Deliberately a
 * hairline across the measure, not a decorative rule.
 */
.jsd-prose > hr,
.jsd-prose > .wp-block-separator,
.jsd-prose > .wp-block-group__inner-container > hr,
.jsd-prose > .wp-block-group__inner-container > .wp-block-separator {
	max-width: 720px;
	height: 0;
	margin: 48px auto;
	border: 0;
	border-top: 1px solid #e5e5e5;
}

/* Forms in the prose column ---------------------------------------------- */

/*
 * A WPForms form dropped into an editorial page — the contact form today.
 * Unstyled, WPForms ships a blue submit button and a focus state that no rule
 * in the JSD stack replaces, so both are set here: monochrome furniture, and a
 * focus ring that is actually visible on every control.
 *
 * WPForms' own variables are declared at higher specificity than a plain
 * container selector, so the values that matter are restated concretely below
 * as well as through the variables.
 */
.jsd-prose div.wpforms-container.wpforms-container-full {
	--wpforms-field-border-radius: 2px;
	--wpforms-field-border-style: solid;
	--wpforms-field-border-size: 1px;
	--wpforms-field-background-color: #ffffff;
	--wpforms-field-border-color: #e5e5e5;
	--wpforms-field-text-color: #111111;
	--wpforms-label-color: #111111;
	--wpforms-label-sublabel-color: #767676;
	--wpforms-label-error-color: #c1121f;
	--wpforms-button-border-radius: 2px;
	--wpforms-button-border-style: solid;
	--wpforms-button-border-size: 1px;
	--wpforms-button-background-color: #000000;
	--wpforms-button-border-color: #000000;
	--wpforms-button-text-color: #ffffff;
	--wpforms-field-size-input-height: 51px;
	--wpforms-field-size-font-size: 16px;
	--wpforms-field-size-padding-h: 16px;
	--wpforms-button-size-font-size: 12px;
	--wpforms-button-size-height: 51px;
	--wpforms-button-size-padding-h: 30px;

	max-width: 720px;
	margin: 0 auto;
}

.jsd-prose div.wpforms-container .wpforms-form .wpforms-field {
	padding: 0 0 22px;
}

.jsd-prose div.wpforms-container .wpforms-form .wpforms-field-label {
	display: block;
	margin: 0 0 8px;
	color: #111111;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.jsd-prose div.wpforms-container .wpforms-form .wpforms-required-label {
	color: #767676;
	font-weight: 700;
}

.jsd-prose div.wpforms-container .wpforms-form input[type="text"],
.jsd-prose div.wpforms-container .wpforms-form input[type="email"],
.jsd-prose div.wpforms-container .wpforms-form select,
.jsd-prose div.wpforms-container .wpforms-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	padding: 0 16px;
	border: 1px solid #e5e5e5;
	border-radius: 2px;
	background-color: #ffffff;
	color: #111111;
	/* 16px keeps iOS from zooming the page on focus. */
	font-size: 16px;
}

.jsd-prose div.wpforms-container .wpforms-form input[type="text"],
.jsd-prose div.wpforms-container .wpforms-form input[type="email"],
.jsd-prose div.wpforms-container .wpforms-form select {
	height: 51px;
}

.jsd-prose div.wpforms-container .wpforms-form textarea {
	min-height: 170px;
	padding: 14px 16px;
	line-height: 1.6;
	resize: vertical;
}

.jsd-prose div.wpforms-container .wpforms-form input::placeholder,
.jsd-prose div.wpforms-container .wpforms-form textarea::placeholder {
	color: #767676;
	opacity: 1;
}

/*
 * Drawn with `outline` rather than `border-color` or `box-shadow`: both of
 * those are set on inputs by declarations elsewhere in the stack that outrank
 * even an inline style here. The outline sits inside the field, so nothing
 * shifts when it appears.
 */
.jsd-prose div.wpforms-container .wpforms-form input[type="text"]:focus,
.jsd-prose div.wpforms-container .wpforms-form input[type="email"]:focus,
.jsd-prose div.wpforms-container .wpforms-form select:focus,
.jsd-prose div.wpforms-container .wpforms-form textarea:focus {
	outline: 2px solid #111111;
	outline-offset: -2px;
}

.jsd-prose div.wpforms-container .wpforms-form .wpforms-submit-container {
	margin: 6px 0 0;
	padding: 0;
}

.jsd-prose div.wpforms-container .wpforms-form button[type="submit"] {
	box-sizing: border-box;
	height: 51px;
	margin: 0;
	padding: 0 30px;
	border: 1px solid #000000;
	border-radius: 2px;
	background-color: #000000;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.jsd-prose div.wpforms-container .wpforms-form button[type="submit"]:hover,
.jsd-prose div.wpforms-container .wpforms-form button[type="submit"]:focus-visible {
	border-color: #333333;
	background-color: #333333;
	color: #ffffff;
}

.jsd-prose div.wpforms-container .wpforms-form button[type="submit"]:focus-visible {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.jsd-prose div.wpforms-container .wpforms-form label.wpforms-error,
.jsd-prose div.wpforms-container .wpforms-form em.wpforms-error {
	display: block;
	margin: 8px 0 0;
	color: #c1121f;
	font-size: 13px;
	font-style: normal;
	line-height: 1.5;
}

.jsd-prose div.wpforms-container .wpforms-form input.wpforms-error,
.jsd-prose div.wpforms-container .wpforms-form select.wpforms-error,
.jsd-prose div.wpforms-container .wpforms-form textarea.wpforms-error {
	outline: 2px solid #c1121f;
	outline-offset: -2px;
}

.jsd-prose div.wpforms-container div.wpforms-confirmation-container,
.jsd-prose div.wpforms-container div.wpforms-confirmation-container-full,
.jsd-prose div.wpforms-confirmation-container-full {
	max-width: 720px;
	margin: 0 auto;
	padding: 20px 22px;
	border: 1px solid #111111;
	border-radius: 2px;
	background: #ffffff;
	color: #111111;
}

.jsd-prose div.wpforms-container div.wpforms-confirmation-container p:last-child,
.jsd-prose div.wpforms-container div.wpforms-confirmation-container-full p:last-child {
	margin-bottom: 0;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 782px) {
	.jsd-page-header {
		padding: 48px 20px 32px;
	}

	.jsd-page-header .jsd-page-header__standfirst {
		margin-top: 20px;
	}

	.jsd-page-header--compact {
		padding-top: 36px;
		padding-bottom: 24px;
	}

	.jsd-page-header.jsd-page-header--compact .jsd-page-header__standfirst {
		margin-top: 14px;
	}

	.jsd-prose {
		padding: 40px 20px 72px;
	}

	.jsd-prose.jsd-prose.jsd-prose {
		padding-left: 20px;
		padding-right: 20px;
	}

	.jsd-prose > h2,
	.jsd-prose > .wp-block-group__inner-container > h2 {
		margin-top: 44px;
	}

	.jsd-prose div.wpforms-container .wpforms-form button[type="submit"] {
		width: 100%;
	}

	.jsd-prose > h2:first-child,
	.jsd-prose > .wp-block-group__inner-container > h2:first-child {
		margin-top: 0;
	}
}
