/*
 * WayHome: guides.
 *
 * Loaded with single-place.css, which supplies the contents block and the card
 * grid, so this file is the guide's own furniture only.
 */

.guide-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-m);
	padding-block: var(--space-s);
	font-size: var(--step--1);
	color: var(--grey-700);
	border-block-end: 1px solid var(--color-border);
}

.guide-meta span {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
}

.entry--guide .entry-content {
	max-width: 68ch;
}

.entry--guide .entry-content h2 {
	margin-block-start: var(--space-xl);
}

.entry--guide .entry-content h3 {
	margin-block-start: var(--space-l);
}

.card-grid--tight {
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
/*
 * WayHome: lead forms.
 *
 * Only what the theme's components.css does not already cover. Field, label,
 * hint, error, reference, required marker and button styling come from the
 * theme; this file adds the layout, the honeypot, the choice rows, the notices
 * and the dialog. Every custom property carries a fallback, so a form still
 * looks right if it is rendered on a page that has not loaded tokens.css.
 *
 * This sheet is enqueued after the theme's bundle, so anything declared here at
 * the same specificity wins. Nothing the theme is meant to own may be set here.
 */

.wh-form-wrap {
	display: flow-root;
	max-width: 46rem;
}

.wh-form__title {
	margin: 0 0 var(--space-2xs, 0.5rem);
	font-family: var(--font-heading, system-ui, sans-serif);
	line-height: var(--lh-heading, 1.2);
}

.wh-form__intro {
	margin: 0 0 var(--space-m, 1.5rem);
	color: var(--color-text-muted, #484848);
}

.wh-form {
	display: flex;
	flex-direction: column;
	gap: var(--wh-form-gap, 0.75rem);
}

.wh-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wh-form-gap, 0.75rem);
}

@media (min-width: 40em) {
	.wh-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wh-form__grid > .field {
		grid-column: 1 / -1;
	}

	.wh-form__grid > .field--half {
		grid-column: auto;
	}
}

.wh-form-wrap--compact .wh-form__grid {
	grid-template-columns: 1fr;
}

/* The theme styles .field; these only fill the gaps. */

.field--checkbox_group {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.field__error[hidden] {
	display: none;
}

.field__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.1em;
	block-size: 1.1em;
	margin-inline-end: 0.35em;
	font-weight: 700;
	color: var(--white, #fff);
	background-color: var(--coral-700, #c63b40);
	border-radius: var(--radius-pill, 999px);
}

/* --- Choices ----------------------------------------------------------- */

.wh-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: var(--space-2xs, 0.5rem);
	margin-block-start: var(--space-3xs, 0.25rem);
}

.wh-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2xs, 0.5rem);
	padding: var(--space-2xs, 0.5rem);
	line-height: var(--lh-ui, 1.35);
	border-radius: var(--radius-m, 8px);
	cursor: pointer;
}

.wh-choice:hover {
	background-color: var(--grey-100, #f7f7f7);
}

.wh-choice input[type="checkbox"] {
	inline-size: 1.25rem;
	block-size: 1.25rem;
	min-block-size: 0;
	margin-block-start: 0.15em;
	flex: none;
	accent-color: var(--coral-700, #c63b40);
}

.field--consent {
	font-size: var(--step--1, 0.875rem);
}

.field--consent .wh-choice {
	padding-inline: 0;
}

.field--consent .wh-choice:hover {
	background-color: transparent;
}

/* --- Honeypot ----------------------------------------------------------
 * Off screen rather than display:none, because the simplest bots skip
 * anything that is display none and fill everything else.
 * -------------------------------------------------------------------- */

.wh-hp {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Reference row -------------------------------------------------------
 * A quiet line of context, not a highlighted panel. The theme sets the size
 * and the colour; only the line-up belongs here.
 * ---------------------------------------------------------------------- */

.wh-form__ref {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3xs, 0.25rem);
	align-items: baseline;
	margin: 0;
}

/* --- Actions, status, notices ------------------------------------------- */

.wh-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s, 1rem);
	align-items: center;
}

.wh-form__busy {
	font-size: var(--step--1, 0.875rem);
	color: var(--color-text-muted, #484848);
}

.wh-form__busy[hidden] {
	display: none;
}

.wh-form__status:empty {
	display: none;
}

.wh-form__notice,
.wh-form__status:not(:empty) {
	padding: var(--space-xs, 0.75rem) var(--space-s, 1rem);
	margin-block-end: var(--space-m, 1.5rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__notice--error,
.wh-form__status--error {
	border-inline-start-color: var(--coral-700, #c63b40);
}

.wh-form__done[hidden] {
	display: none;
}

.wh-form__done {
	padding: var(--space-s, 1rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__done p {
	margin: 0 0 var(--space-2xs, 0.5rem);
}

.wh-form__done p:last-child {
	margin-block-end: 0;
}

.wh-form[data-wayhome-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.wh-form__turnstile {
	min-block-size: 65px;
}

/* --- Dialog ------------------------------------------------------------- */

.wh-dialog {
	inline-size: min(34rem, calc(100vw - 2rem));
	padding: 0;
	color: var(--color-text, #111);
	background-color: var(--color-bg, #fff);
	border: 1px solid var(--color-border, #ebebeb);
	border-radius: var(--radius-l, 16px);
	box-shadow: var(--shadow-2, 0 12px 32px rgb(17 17 17 / 18%));
}

.wh-dialog::backdrop {
	background-color: rgb(17 17 17 / 55%);
}

.wh-dialog__inner {
	position: relative;
	padding: var(--space-l, 2rem);
}

.wh-dialog__close {
	position: absolute;
	inset-block-start: var(--space-2xs, 0.5rem);
	inset-inline-end: var(--space-2xs, 0.5rem);
}

.wh-dialog .wh-form-wrap {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.wh-form,
	.wh-choice {
		transition: none;
	}
}