/*
 * ISHOA Events - resident-facing styles.
 *
 * Ported from the approved prototype. Two differences from that file:
 *
 *  1. Everything is scoped under .ishoa-ev and re-declares the properties a
 *     theme is most likely to inherit into form controls. The live ishoa.org
 *     theme forces uppercase headings, uppercase buttons with 2px tracking,
 *     and its own font stack onto anything it can reach; without these resets
 *     the form renders in a voice the prototype never intended.
 *
 *  2. Focus states, hit targets, and error styling are strengthened for
 *     accessibility (specification 20).
 */

.ishoa-ev {
	--ink: #2b1d12;
	--muted: #7a6957;
	--line: #e2d8c6;
	--bg: #fcfaf5;
	--panel: #f5efe2;
	--accent: #33211d;
	--gold: #b8912f;
	--gold-soft: #e8d9ae;
	/* Section labels were --gold on cream: 2.8:1, below the 4.5:1 AA floor and
	   genuinely hard to read. Same bronze family, deepened to 7.6:1. */
	--label: #6f4a12;
	/* The site's own crimson, taken from the theme's "Hot News" button. Two
	   near-identical reds on one page read as a mistake; one shared red reads
	   as a design. White text on it is 6.5:1, above the 4.5:1 AA floor. */
	--red: #af2a3b;
	--red-deep: #8c1f2e;
	--warn: #8a5a1c;
	--warnbg: #fbf1dc;
	--ok: #2f6b46;
	--okbg: #eef6f0;

	max-width: 640px;
	/* Generous room below: the last thing a resident does is press a button
	   at the bottom of the card, and doing that against the very edge of the
	   window feels cramped. */
	margin: 0 auto 96px;
	color: var(--ink);
	font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	text-align: left;
}

.ishoa-ev *,
.ishoa-ev *::before,
.ishoa-ev *::after {
	box-sizing: inherit;
}

/* Theme defence: reset inherited typography on our own elements. */
.ishoa-ev h2,
.ishoa-ev h3,
.ishoa-ev p,
.ishoa-ev label,
.ishoa-ev span,
.ishoa-ev button,
.ishoa-ev input,
.ishoa-ev select {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.ishoa-ev__card {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 28px;
	border-top: 3px solid var(--red);
}

.ishoa-ev__head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 4px;
}

.ishoa-ev__logo {
	width: 60px;
	height: 60px;
	flex: none;
	display: block;
}

.ishoa-ev__title {
	margin: 0 0 4px;
	font-size: 25px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--accent);
}

.ishoa-ev__sub {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.ishoa-ev__rule {
	height: 2px;
	width: 56px;
	background: var(--red);
	border-radius: 2px;
	margin: 20px 0 26px;
}

.ishoa-ev p.ishoa-ev__legend {
	display: inline-block;
	font-size: 14.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--label);
	background: rgba( 184, 145, 47, .14 );
	border-radius: 5px;
	padding: 7px 13px;
	margin: 0 0 14px;
}

/* Same chip, for the confirmation step where the accent is the event red. */
.ishoa-ev p.ishoa-ev__legend--red {
	color: var(--red-deep);
	background: rgba( 175, 42, 59, .11 );
}

.ishoa-ev__ask {
	font-size: 19px;
	margin: 0 0 14px;
	line-height: 1.45;
}

.ishoa-ev__ask b {
	font-weight: 600;
	color: var(--accent);
}

.ishoa-ev label {
	display: block;
	font-size: 15px;
	margin-bottom: 6px;
	font-weight: 500;
}

/*
 * Every text-ish input type this form uses, listed explicitly.
 *
 * `tel` was missing when the phone field was added in 0.19.0, so that one
 * field fell back to the browser's own styling — and, worse, to the browser's
 * default size. Anything under 16px makes iOS Safari zoom the page when the
 * field is focused, which on a phone throws the resident out of the layout
 * mid-form. Keep this list in step with the templates.
 */
.ishoa-ev input[type="text"],
.ishoa-ev input[type="email"],
.ishoa-ev input[type="tel"],
.ishoa-ev input[type="number"],
.ishoa-ev input[type="password"],
.ishoa-ev select {
	width: 100%;
	padding: 13px 13px;
	/* 16px minimum: anything smaller makes iOS Safari zoom on focus. Sized
	   above that floor because these are filled in on a phone, standing up,
	   often by someone who would rather not reach for reading glasses. */
	font-size: 17px;
	line-height: 1.4;
	color: var(--ink);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	appearance: none;
	margin: 0;
	height: auto;
	box-shadow: none;
}

/* The resident passcode: masked to look like a password field, without being
   one as far as the browser is concerned. See the note in registration.php —
   type="password" is what pulled iCloud Keychain into the sign-up. Firefox
   does not support this property and shows the characters, which is a fair
   trade for not hijacking iPhone sign-ups. */
.ishoa-ev input.ishoa-ev__secret {
	-webkit-text-security: disc;
	text-security: disc;
	letter-spacing: .12em;
}


.ishoa-ev select {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6957' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 18px;
	padding-right: 36px;
}

.ishoa-ev input:focus,
.ishoa-ev select:focus,
.ishoa-ev button:focus-visible,
.ishoa-ev [tabindex]:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

.ishoa-ev__grid {
	display: grid;
	grid-template-columns: 1fr 150px;
	gap: 14px;
	align-items: start;
}

.ishoa-ev__grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 22px;
}

.ishoa-ev__prow {
	display: grid;
	grid-template-columns: 1fr 1fr 42px;
	grid-template-areas:
		"first last remove"
		"hobby hobby remove";
	gap: 8px;
	margin-bottom: 22px;
	align-items: start;
}

.ishoa-ev__prow [data-person="first"] { grid-area: first; }
.ishoa-ev__prow [data-person="last"]  { grid-area: last; }
.ishoa-ev__prow [data-person="hobby"] { grid-area: hobby; }
.ishoa-ev__prow .ishoa-ev__x { grid-area: remove; }

/* House-number typeahead */
.ishoa-ev__ta {
	position: relative;
}

.ishoa-ev__list {
	position: absolute;
	z-index: 40;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	/* Four rows. Taller than this and the list dominates the card. */
	max-height: 172px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(43, 29, 18, .14);
	display: none;
	padding: 4px 0;
	margin: 0;
	list-style: none;
}

.ishoa-ev__list[data-open="1"] {
	display: block;
}

.ishoa-ev__opt {
	padding: 9px 12px;
	font-size: 16px;
	cursor: pointer;
	line-height: 1.2;
	margin: 0;
}

.ishoa-ev__opt[aria-selected="true"],
.ishoa-ev__opt:hover {
	background: var(--panel);
}

.ishoa-ev__none {
	padding: 9px 12px;
	font-size: 14px;
	color: var(--muted);
}

/* Choice controls */
.ishoa-ev__radio,
.ishoa-ev__check {
	/* The selected colour, as a variable so a group can set its own. The
	   volunteering checkboxes below use gold; everything else uses the red. */
	--hue: var(--red);
	--tint: var(--panel);

	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 6px;
	margin-bottom: 9px;
	cursor: pointer;
	background: #fff;
	font-size: 16px;
}

.ishoa-ev__check {
	align-items: center;
	margin: 0;
}

.ishoa-ev__radio:has(input:checked),
.ishoa-ev__check:has(input:checked) {
	border-color: var(--hue);
	background: var(--tint);
	box-shadow: inset 3px 0 0 var(--hue);
}

.ishoa-ev__radio input,
.ishoa-ev__check input {
	accent-color: var(--hue);
	width: auto;
	margin: 0;
	flex: none;
}

.ishoa-ev__radio input {
	margin-top: 3px;
}

/*
 * These lines are not asides — they are the difference between a resident
 * putting their own name on the guest list and assuming the contact box did
 * it for them. At 13px in --muted they read as fine print people skip.
 */
.ishoa-ev__hint {
	display: block;
	font-size: 16px;
	font-weight: 500;
	color: #5c4a33;
	margin-top: 4px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Volunteering
 *
 * A menu of jobs rather than a row of afterthoughts: room to be worth looking
 * at, and a drawn outline instead of the hairline the rest of the form uses.
 *
 * The colour is the association's own — ink until you tick one, gold once you
 * have. Four pastel tints and a small icon per job were tried first; against a
 * cream page they read as decoration rather than as four things to choose
 * between, and each icon was a picture that had to be decoded before the words
 * next to it could be read.
 * ------------------------------------------------------------------------ */

.ishoa-ev__checks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 11px;
	margin-bottom: 22px;
}

/*
 * Two classes deep on purpose. The shared `:has(input:checked)` rule above
 * scores (0,1,1) — a single-class selector here would outrank it and the
 * ticked state would never paint. The checked rule below matches this depth
 * and adds the pseudo-class, so it wins.
 */
.ishoa-ev__checks .ishoa-ev__check {
	align-items: center;
	gap: 14px;
	padding: 16px 15px;
	font-size: 16.5px;
	font-weight: 500;
	line-height: 1.3;
	background: #fff;
	border: 2px solid var(--ink);
	box-shadow: none;
	transition: border-color .12s ease, background .12s ease;
}

.ishoa-ev__checks .ishoa-ev__check:has(input:checked) {
	background: rgba(184, 145, 47, .1);
	border-color: var(--gold);
	box-shadow: inset 4px 0 0 var(--gold);
	font-weight: 600;
}

.ishoa-ev__checks .ishoa-ev__check input {
	width: 20px;
	height: 20px;
	accent-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
	.ishoa-ev__checks .ishoa-ev__check {
		transition: none;
	}
}

/* Buttons */
.ishoa-ev button {
	font: inherit;
	font-size: 16px;
	padding: 12px 18px;
	border-radius: 6px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	width: auto;
	height: auto;
	line-height: 1.4;
}

.ishoa-ev button:hover {
	border-color: var(--muted);
}

/*
 * The modifier selectors carry an extra element to outrank `.ishoa-ev button`
 * above. Without it that base rule's `background:#fff`, `width:auto` and
 * padding win on specificity and every primary button renders as a small
 * white outline — which is exactly what happened on the live site.
 */
.ishoa-ev button.ishoa-ev__primary {
	width: 100%;
	background: var(--red);
	border-color: var(--red);
	color: #fff;
	font-weight: 600;
	font-size: 17px;
	padding: 14px 22px;
	box-shadow: 0 1px 2px rgba( 43, 29, 18, .14 );
}

.ishoa-ev button.ishoa-ev__primary:hover {
	background: var(--red-deep);
	border-color: var(--red-deep);
	color: #fff;
}

.ishoa-ev button.ishoa-ev__primary:disabled {
	opacity: .6;
	cursor: default;
	box-shadow: none;
}

.ishoa-ev button.ishoa-ev__ghost {
	width: 100%;
	background: transparent;
	padding: 14px 20px;
	font-size: 16px;
}

/*
 * Paired buttons sit on one line: the primary takes the room, the way out
 * stays beside it rather than below the fold.
 */
.ishoa-ev__actions {
	display: flex;
	gap: 12px;
	align-items: stretch;
	margin-top: 20px;
}

.ishoa-ev .ishoa-ev__actions button.ishoa-ev__primary {
	flex: 1 1 auto;
	width: auto;
}

.ishoa-ev .ishoa-ev__actions button.ishoa-ev__ghost {
	flex: 0 0 auto;
	width: auto;
	min-width: 128px;
}

.ishoa-ev button.ishoa-ev__x {
	padding: 0;
	color: var(--muted);
	font-size: 20px;
	line-height: 1;
	min-height: 42px;
}

.ishoa-ev button.ishoa-ev__danger {
	background: transparent;
	border-color: var(--line);
	color: var(--red-deep);
}

.ishoa-ev button.ishoa-ev__danger:hover {
	border-color: var(--red);
}

/* Count panel */
.ishoa-ev__count {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	background: var(--panel);
	border-radius: 6px;
	padding: 13px 16px;
	margin: 20px 0 22px;
	border-left: 3px solid var(--gold);
}

.ishoa-ev__count b {
	font-size: 26px;
	font-weight: 600;
	color: var(--red);
}

/* "Attending from your household" — a running total the resident should be
   checking, so it is not whispered either. */
.ishoa-ev__count > span {
	font-size: 16px;
	font-weight: 500;
	color: #5c4a33;
}

/* Messages */
.ishoa-ev__warn,
.ishoa-ev__err,
.ishoa-ev__note,
.ishoa-ev__ok {
	border-radius: 6px;
	padding: 10px 13px;
	font-size: 14px;
	margin-top: 10px;
	line-height: 1.45;
}

.ishoa-ev__warn {
	background: var(--warnbg);
	color: var(--warn);
}

.ishoa-ev__err {
	background: var(--panel);
	color: var(--red-deep);
	border: 1px solid var(--line);
	border-left: 3px solid var(--red);
}

/*
 * Not a warning and not a failure — a standing note about the mode the form is
 * in. Deliberately quiet, and deliberately not the error palette.
 */
.ishoa-ev__note {
	background: var(--panel);
	color: var(--ink);
	border: 1px solid var(--line);
	border-left: 3px solid var(--muted);
	margin: 0 0 16px;
}

.ishoa-ev__ok {
	background: var(--okbg);
	color: var(--ok);
}

.ishoa-ev [hidden] {
	display: none !important;
}

.ishoa-ev__bad {
	border-color: var(--red) !important;
	background: #fdf5f4;
}

/* Review + done */
.ishoa-ev__review {
	background: var(--panel);
	border: 1px solid var(--red);
	border-radius: 6px;
	padding: 18px;
	margin-top: 18px;
}

.ishoa-ev__done {
	text-align: center;
	padding: 36px 20px;
}

.ishoa-ev__done h3 {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 600;
	color: var(--red);
}

.ishoa-ev__conf {
	display: inline-block;
	margin: 14px 0;
	padding: 12px 20px;
	background: var(--panel);
	border: 1px dashed var(--red);
	border-radius: 8px;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--accent);
}

/* Step progress */
.ishoa-ev__steps {
	display: flex;
	gap: 6px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.ishoa-ev__step {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: var(--line);
	margin: 0;
}

.ishoa-ev__step[data-state="done"],
.ishoa-ev__step[data-state="current"] {
	background: var(--red);
}

.ishoa-ev__step[data-state="current"] {
	opacity: .55;
}

/* Attendance badge */
.ishoa-ev--badge {
	text-align: center;
}

.ishoa-ev__badge-total {
	font-size: 44px;
	font-weight: 600;
	color: var(--red);
	line-height: 1.1;
	display: block;
}

.ishoa-ev__badge-label {
	color: var(--muted);
	font-size: 15px;
	display: block;
	margin-top: 2px;
}

.ishoa-ev__badge-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 18px;
}

.ishoa-ev__badge-actions a {
	display: inline-block;
	padding: 11px 18px;
	border-radius: 6px;
	font-size: 15px;
	text-decoration: none;
	border: 1px solid var(--red);
}

.ishoa-ev__badge-actions a:first-child {
	background: var(--red);
	color: #fff;
}

.ishoa-ev__badge-actions a:last-child {
	color: var(--red-deep);
	background: transparent;
}

.ishoa-ev__spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	vertical-align: -2px;
	margin-right: 7px;
}

@media (prefers-reduced-motion: no-preference) {
	.ishoa-ev__spinner {
		animation: ishoa-ev-spin .7s linear infinite;
	}

	.ishoa-ev__panel-enter {
		animation: ishoa-ev-fade .2s ease;
	}
}

@keyframes ishoa-ev-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes ishoa-ev-fade {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 520px) {
	.ishoa-ev__card {
		padding: 20px;
	}

	.ishoa-ev__actions {
		flex-direction: column;
	}

	.ishoa-ev .ishoa-ev__actions button.ishoa-ev__ghost {
		width: 100%;
	}

	.ishoa-ev__grid,
	.ishoa-ev__grid2,
	.ishoa-ev__checks {
		grid-template-columns: 1fr;
	}

	/*
	 * First and last name stay side by side on a phone. Stacking them would
	 * turn one person into two rows and a household of five into a wall, and
	 * the pair plainly belongs together. The room comes from the gaps and the
	 * remove button instead.
	 */
	.ishoa-ev__prow {
		grid-template-columns: 1fr 1fr 34px;
		gap: 6px;
		margin-bottom: 18px;
	}

	.ishoa-ev__prow input[type="text"] {
		padding-left: 10px;
		padding-right: 10px;
	}

	.ishoa-ev__logo {
		width: 48px;
		height: 48px;
	}

	.ishoa-ev__head {
		gap: 12px;
	}

	.ishoa-ev__title {
		font-size: 22px;
	}
}

@media (prefers-contrast: more) {
	.ishoa-ev {
		--muted: #5c4d3d;
		--line: #b9ac96;
	}
}

/* ---------------------------------------------------------------------------
 * Decorated attendance badge
 *
 * The invitation-style panel for the top of a landing page. A dark wash sits
 * over whatever photograph the event supplies so the gold and cream type keeps
 * its contrast no matter how bright or busy the image is — the text is never
 * at the mercy of the picture.
 * ------------------------------------------------------------------------ */

.ishoa-ev--decorated {
	max-width: 720px;
}

.ishoa-ev__hero {
	position: relative;
	border-radius: 14px;
	padding: 40px 34px 34px;
	text-align: center;
	color: #f6efe2;
	overflow: hidden;
	/* Fallback when no image is set: the brand charcoal brown. */
	background-color: #241711;
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(232, 217, 174, .28);
	box-shadow: 0 10px 34px rgba(24, 15, 10, .22);
}

.ishoa-ev__hero-logo {
	width: 64px;
	height: 64px;
	display: block;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: rgba(246, 239, 226, .1);
}

.ishoa-ev__hero-kicker {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold-soft);
}

.ishoa-ev__hero-title {
	margin: 0 0 20px;
	font-size: 38px;
	line-height: 1.1;
	font-weight: 600;
	letter-spacing: -.01em;
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
}

.ishoa-ev__hero-facts {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: inline-flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

.ishoa-ev__hero-facts li {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #efe5d4;
}

.ishoa-ev__hero-facts svg,
.ishoa-ev__hero-count svg {
	width: 19px;
	height: 19px;
	flex: none;
	margin-top: 1px;
	fill: none;
	stroke: var(--gold-soft);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ishoa-ev__hero-facts small {
	display: block;
	font-size: 13.5px;
	color: rgba(239, 229, 212, .68);
	margin-top: 1px;
}

.ishoa-ev__hero-count {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	flex-wrap: wrap;
	background: rgba(246, 239, 226, .09);
	border: 1px solid rgba(232, 217, 174, .3);
	border-radius: 10px;
	padding: 15px 22px;
	margin: 0 auto 24px;
	max-width: 420px;
}

.ishoa-ev__hero-count svg {
	width: 26px;
	height: 26px;
	margin: 0;
}

.ishoa-ev__hero-count strong {
	font-size: 36px;
	font-weight: 600;
	line-height: 1;
	color: var(--gold-soft);
	font-variant-numeric: tabular-nums;
}

.ishoa-ev__hero-count span {
	font-size: 15px;
	color: #efe5d4;
}

.ishoa-ev__hero-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.ishoa-ev__hero-cta {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 8px;
	background: var(--gold-soft);
	color: #241711;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--gold-soft);
	transition: background .15s ease, transform .15s ease;
}

.ishoa-ev__hero-cta:hover,
.ishoa-ev__hero-cta:focus {
	background: #f3e7c6;
	color: #241711;
	transform: translateY(-1px);
}

.ishoa-ev__hero-link {
	color: rgba(246, 239, 226, .88);
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ishoa-ev__hero-link:hover,
.ishoa-ev__hero-link:focus {
	color: #fff;
}

.ishoa-ev__hero-cta:focus-visible,
.ishoa-ev__hero-link:focus-visible {
	outline: 2px solid var(--gold-soft);
	outline-offset: 3px;
}

.ishoa-ev__hero-note {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}

/* "Did you mean" email correction */
.ishoa-ev__suggest {
	font: inherit;
	font-weight: 600;
	padding: 2px 6px;
	margin: 0 1px;
	border: 1px dashed currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ishoa-ev__suggest:hover {
	background: rgba(138, 90, 28, .12);
	border-style: solid;
}

@media (max-width: 560px) {
	.ishoa-ev__hero {
		padding: 30px 20px 26px;
	}

	.ishoa-ev__hero-title {
		font-size: 29px;
	}

	.ishoa-ev__hero-count strong {
		font-size: 30px;
	}

	.ishoa-ev__hero-cta {
		display: block;
		padding: 14px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ishoa-ev__hero-cta {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Theme defence for the decorated badge.
 *
 * The generic reset near the top of this file neutralises inherited fonts and
 * text-transform, but deliberately leaves colour alone — the light card wants
 * to keep its own ink colours. The dark hero panel is the opposite case: the
 * theme's heading colour (dark brown, chosen for a cream page) renders as
 * near-black text on a near-black panel, and the theme's underlined link style
 * turns the call-to-action button into an underlined word.
 *
 * These selectors are intentionally specific enough to win without !important.
 * ------------------------------------------------------------------------ */

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero h2.ishoa-ev__hero-title {
	color: #fff;
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero .ishoa-ev__hero-kicker {
	color: var(--gold-soft);
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero .ishoa-ev__hero-facts li,
.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero .ishoa-ev__hero-count span {
	color: #efe5d4;
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero .ishoa-ev__hero-count strong {
	color: var(--gold-soft);
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-cta {
	text-decoration: none;
	color: #241711;
	background: var(--gold-soft);
	box-shadow: none;
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-cta:hover,
.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-cta:focus {
	text-decoration: none;
	color: #241711;
	background: #f3e7c6;
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-link {
	color: rgba(246, 239, 226, .88);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-link:hover,
.ishoa-ev.ishoa-ev--decorated .ishoa-ev__hero a.ishoa-ev__hero-link:focus {
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * Poster badge
 *
 * The invitation card: portrait, left-aligned, gold script headline over a
 * photograph. Sized for a sidebar or a column rather than full width — a
 * poster that stretches to 1200px stops reading as a poster.
 *
 * Type is set in a serif stack with no web font. A downloaded script face
 * would be closer to a printed invitation, but it costs a render-blocking
 * request on every page view and sends every visitor's IP to a font host;
 * Georgia italic in gold carries the same formality for free.
 * ------------------------------------------------------------------------ */

.ishoa-ev--poster {
	max-width: 440px;
}

.ishoa-ev__poster {
	position: relative;
	border-radius: 16px;
	padding: 30px 28px 26px;
	color: #f6efe2;
	overflow: hidden;
	background-color: #100a06;
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(232, 217, 174, .34);
	box-shadow: 0 16px 44px rgba(16, 10, 6, .3);
	text-align: left;

	/* Hold the 3:4 shape of the artwork. Sized to its content the card became
	 * a letterbox that cropped the photograph to a narrow middle band — the
	 * tree lost its top, the table lost its foreground. The header block sits
	 * at the top, the action block is pushed to the bottom, and the scene
	 * shows through the gap between them. */
	 * The explicit width is not decoration. With `width: auto` the browser is
	 * entitled to derive the width from the aspect ratio once min-height makes
	 * the height definite — which it does: 560px tall became 420px wide, and
	 * the card hung 46px past the right edge of a 390px phone, giving the
	 * whole page a sideways scroll. Pinning the width means the ratio can only
	 * ever decide the height. */
	aspect-ratio: 3 / 4;
	min-height: 600px;
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Brand lockup */
.ishoa-ev__poster-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}

.ishoa-ev__poster-brand img {
	width: 54px;
	height: 54px;
	flex: none;
	display: block;
}

.ishoa-ev__poster-mark {
	display: block;
	font-size: 29px;
	line-height: 1;
	font-weight: 600;
	letter-spacing: .16em;
	color: var(--gold-soft);
	font-family: Georgia, "Times New Roman", serif;
}

.ishoa-ev__poster-sub {
	display: block;
	margin-top: 4px;
	font-size: 9.5px;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: rgba(232, 217, 174, .78);
}

/* Headline */
.ishoa-ev__poster-kicker {
	margin: 0 0 2px;
	font-size: 27px;
	line-height: 1.1;
	color: #f2e9d8;
	font-family: Georgia, "Times New Roman", serif;
}

.ishoa-ev__poster-title {
	margin: 0 0 22px;
	font-size: 50px;
	line-height: 1.02;
	font-weight: 400;
	font-style: italic;
	letter-spacing: -.005em;
	color: var(--gold-soft);
	font-family: Georgia, "Times New Roman", serif;
	text-shadow: 0 2px 14px rgba(16, 10, 6, .55);
}

/* Facts */
.ishoa-ev__poster-facts {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.ishoa-ev__poster-facts li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 18.5px;
	line-height: 1.3;
	color: #f2e9d8;
}

.ishoa-ev__poster-facts svg,
.ishoa-ev__poster-count svg,
.ishoa-ev__poster-note svg {
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ishoa-ev__poster-facts svg {
	width: 21px;
	height: 21px;
	color: var(--gold-soft);
}

/*
 * Call to action.
 *
 * Was a translucent outline over the photograph, which looked like part of
 * the artwork rather than the one thing on the card you are meant to touch.
 * It is now a solid slab: opaque cream-gold, dark text, no transparency for
 * the background to show through. Whatever the photograph is doing behind it,
 * the button reads the same.
 */
.ishoa-ev__poster-cta {
	display: block;
	width: 100%;
	padding: 17px 18px;
	/* Sinks the action block to the foot of the card, opening the middle so
	 * the photograph is visible between the details and the button. */
	margin-top: auto;
	margin-bottom: 14px;
	border-radius: 8px;
	border: 1px solid #f3e8c8;
	background: #eddfb6;
	color: #2a1a0d;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(16, 10, 6, .45);
	transition: background .15s ease, border-color .15s ease;
}

.ishoa-ev__poster-cta:hover,
.ishoa-ev__poster-cta:focus {
	background: #fff6dd;
	border-color: #fff6dd;
	color: #2a1a0d;
	text-decoration: none;
}

.ishoa-ev__poster-cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/*
 * Count line.
 *
 * Sits with the date, time and place as one more fact about the evening.
 * Quieter than the button on purpose — it is information, not a target.
 */
.ishoa-ev__poster-count {
	display: flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	margin: -6px 0 20px;
	padding: 8px 16px 8px 12px;
	border-radius: 999px;
	/* Nearly opaque, and darker than the photograph rather than lighter. A
	   translucent wash took its colour from whatever was behind it, so the
	   line was readable over the dark corners of the artwork and washed out
	   over the bright middle. */
	background: rgba(18, 11, 7, .82);
	border: 1px solid rgba(232, 217, 174, .42);
	color: #f2e9d8;
	line-height: 1.25;
}

.ishoa-ev__poster-count svg {
	width: 23px;
	height: 23px;
	stroke-width: 1.6;
	color: var(--gold-soft);
}

.ishoa-ev__poster-count strong {
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--gold-soft);
}

.ishoa-ev__poster-count span {
	font-size: 16.5px;
}

/* Footer lines — the deadline, then who the evening is for. */
.ishoa-ev__poster-foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
}

.ishoa-ev__poster-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 0;
	font-size: 15px;
	line-height: 1.35;
	text-align: center;
	color: rgba(242, 233, 216, .9);
}

/*
 * No orphans on the last line.
 *
 * These lines are typed by the board, so their length is not something the
 * stylesheet can know. "Residents only · Sign up by November 25" broke on a
 * phone with "25" stranded alone underneath, which reads as a mistake rather
 * than as a line of text. Balancing splits the line evenly instead of filling
 * the first one and dropping whatever is left. Browsers that do not know the
 * property ignore this and wrap as before.
 */
.ishoa-ev__poster-note span {
	text-wrap: balance;
}

.ishoa-ev__poster-note svg {
	width: 17px;
	height: 17px;
	color: var(--gold-soft);
}

/* Theme defence, same reasoning as the decorated panel: the site's dark
 * heading colour and underlined links are unreadable on a dark photograph. */
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster h2.ishoa-ev__poster-title {
	color: var(--gold-soft);
	font-style: italic;
}

.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster a.ishoa-ev__poster-cta,
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster a.ishoa-ev__poster-cta:hover,
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster a.ishoa-ev__poster-cta:focus {
	color: #2a1a0d;
	text-decoration: none;
}

.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster .ishoa-ev__poster-count {
	color: #f2e9d8;
}

@media (max-width: 460px) {
	.ishoa-ev__poster {
		padding: 24px 20px 22px;
		min-height: 560px;
	}

	.ishoa-ev__poster-title {
		font-size: 37px;
	}

	.ishoa-ev__poster-count strong {
		font-size: 20px;
	}

	.ishoa-ev__poster-count span {
		font-size: 15.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ishoa-ev__poster-cta {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Display faces for the poster title
 *
 * Self-hosted rather than pulled from fonts.googleapis.com: a Google Fonts
 * link would send every visitor's IP to a third party on every page view and
 * add a render-blocking request to a domain the association does not control.
 * These are ~40 KB each, loaded only on pages carrying a poster badge, and
 * cached after the first view.
 *
 * font-display: swap so the title is readable in the fallback serif while the
 * script downloads — a blank headline is worse than a momentary substitution.
 * ------------------------------------------------------------------------ */

@font-face {
	font-family: "ISHOA Great Vibes";
	src: url("../fonts/great-vibes-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "ISHOA Pinyon Script";
	src: url("../fonts/pinyon-script-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "ISHOA Tangerine";
	src: url("../fonts/tangerine-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/*
 * Script faces need different treatment from the serif: they carry their
 * flourish in the letterforms, so they want size and air rather than italic
 * slant, and their ascenders and descenders need the extra line box.
 */
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster h2.ishoa-ev__poster-title[data-font="great-vibes"],
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster h2.ishoa-ev__poster-title[data-font="pinyon"],
.ishoa-ev.ishoa-ev--poster .ishoa-ev__poster h2.ishoa-ev__poster-title[data-font="tangerine"] {
	font-style: normal;
	line-height: 1.06;
	letter-spacing: 0;
	/* The theme tracks its headings out, and letter-spacing alone does not
	   undo all of it — word-spacing is inherited too, and one wide space is
	   enough to push a two-word title onto a second line. */
	word-spacing: normal;
	padding-bottom: .08em;
}

.ishoa-ev__poster-title[data-font="great-vibes"] {
	font-family: "ISHOA Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
	font-size: 70px;
	font-weight: 400;
}

.ishoa-ev__poster-title[data-font="pinyon"] {
	font-family: "ISHOA Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
	font-size: 65px;
	font-weight: 400;
}

.ishoa-ev__poster-title[data-font="tangerine"] {
	font-family: "ISHOA Tangerine", "Snell Roundhand", "Apple Chancery", cursive;
	font-size: 82px;
	font-weight: 700;
}

@media (max-width: 460px) {
	.ishoa-ev__poster-title[data-font="great-vibes"] {
		font-size: 58px;
	}

	.ishoa-ev__poster-title[data-font="pinyon"] {
		font-size: 54px;
	}

	.ishoa-ev__poster-title[data-font="tangerine"] {
		font-size: 68px;
	}
}

/* ---------------------------------------------------------------------------
 * Keeping the title on one line
 *
 * "Holiday Party" is a two-word name, and breaking it across two lines makes
 * it read as two things. At a fixed size it fits a 440px card and wraps on a
 * phone, which is where most residents will meet it.
 *
 * So the title is sized against its own card rather than the window: 1cqw is
 * one per cent of the card's content width, and the multipliers below are the
 * measured width of "Holiday Party" in each face — a face 5.49 times as wide
 * as it is tall needs 97/5.49 ≈ 17.7cqw to fill the line and no more. The
 * min() keeps the desktop size as the ceiling, so nothing grows.
 *
 * The fixed sizes above stay as the fallback: a browser that does not know
 * cqw discards these declarations whole and gets the old behaviour, and a
 * headline longer than this one still wraps rather than overflowing, which is
 * the right way round.
 * ------------------------------------------------------------------------ */

.ishoa-ev__poster,
.ishoa-ev__formhead {
	container-type: inline-size;
}

.ishoa-ev__poster-title {
	font-size: min(50px, 15.3cqw);
}

.ishoa-ev__poster-title[data-font="great-vibes"] {
	font-size: min(70px, 16.6cqw);
}

.ishoa-ev__poster-title[data-font="pinyon"] {
	font-size: min(65px, 16.3cqw);
}

.ishoa-ev__poster-title[data-font="tangerine"] {
	font-size: min(82px, 15.1cqw);
}

/* ---------------------------------------------------------------------------
 * Poster header on the sign-up form
 *
 * A resident who arrives from the poster should not land on a plain cream
 * card — the design carries straight through. The masthead markup is shared
 * with the badge (templates/public/partials/poster-head.php), so whatever the
 * board chooses for the badge is exactly what appears here.
 *
 * The panel bleeds to the card's edges with negative margins equal to the
 * card padding, rather than restructuring the card into header and body
 * wrappers. Less markup to keep in step, and the rounded top corners line up
 * with the card's own radius.
 *
 * The theme-defence rules are repeated rather than shared with the badge's:
 * those are scoped to `.ishoa-ev--poster .ishoa-ev__poster`, which the form
 * card is not.
 * ------------------------------------------------------------------------ */

/*
 * Deliberately NOT overflow:hidden.
 *
 * Clipping the card was the tidy way to keep the bleeding poster header inside
 * the rounded corner, and it also silently cut off the house-number
 * suggestions, which are absolutely positioned and hang below their field. The
 * header carries its own matching radius below, so the clip was never needed —
 * and a resident who cannot see the list of house numbers cannot sign up.
 */
.ishoa-ev__card--poster {
	overflow: visible;
}

.ishoa-ev__formhead {
	margin: -28px -28px 24px;
	padding: 28px 28px 22px;
	border-radius: 9px 9px 0 0;
	background-color: #100a06;
	background-size: cover;
	background-position: center;
	color: #f6efe2;
	text-align: left;
}

/* No call to action beneath it here — the form itself is the action — so the
   facts list closes the panel instead of opening a gap. */
.ishoa-ev__formhead .ishoa-ev__poster-facts {
	margin-bottom: 0;
}

.ishoa-ev__formhead .ishoa-ev__poster-title {
	margin-bottom: 18px;
}

/* Theme defence: the site forces a dark heading colour and uppercase
   transforms that are unreadable over a photograph. */
.ishoa-ev .ishoa-ev__formhead h2.ishoa-ev__poster-title {
	color: var(--gold-soft);
	font-style: italic;
	text-transform: none;
}

.ishoa-ev .ishoa-ev__formhead h2.ishoa-ev__poster-title[data-font="great-vibes"],
.ishoa-ev .ishoa-ev__formhead h2.ishoa-ev__poster-title[data-font="pinyon"],
.ishoa-ev .ishoa-ev__formhead h2.ishoa-ev__poster-title[data-font="tangerine"] {
	font-style: normal;
	line-height: 1.06;
	letter-spacing: 0;
	/* The theme tracks its headings out, and letter-spacing alone does not
	   undo all of it — word-spacing is inherited too, and one wide space is
	   enough to push a two-word title onto a second line. */
	word-spacing: normal;
	padding-bottom: .08em;
}

.ishoa-ev .ishoa-ev__formhead p.ishoa-ev__poster-kicker {
	color: #f2e9d8;
	text-transform: none;
}

@media (max-width: 520px) {
	/* Track the card's own padding at this breakpoint, or the bleed leaves a
	   sliver of cream down each side. */
	.ishoa-ev__formhead {
		margin: -20px -20px 20px;
		padding: 22px 20px 18px;
	}
}

/* ---------------------------------------------------------------------------
 * Clearing the site header
 *
 * ishoa.org pins its header to the top of the viewport, so anything the form
 * scrolls to lands underneath it. These are fallbacks: public.js measures the
 * real header (admin bar included, and again after a resize) and overrides
 * them, because a hard-coded number is wrong for at least one of desktop,
 * logged-in desktop, and phone.
 * ------------------------------------------------------------------------ */

.ishoa-ev,
.ishoa-ev__review,
.ishoa-ev__done {
	scroll-margin-top: 140px;
}

/* A recovery email that has been sent. Deliberately not the disabled grey:
   nothing failed, the job is done, and the button says so. */
.ishoa-ev button.ishoa-ev__primary[data-sent],
.ishoa-ev button.ishoa-ev__primary[data-sent]:disabled {
	background: var(--ok);
	border-color: var(--ok);
	color: #fff;
	opacity: 1;
	cursor: default;
	box-shadow: none;
}


/* ---------------------------------------------------------------------------
 * Clearance for the ishoa.org page title
 *
 * The site's circular logo deliberately overhangs the header bar and ends
 * around 26px below where the theme starts the page title, so a title on these
 * pages runs underneath it. This stylesheet is only enqueued on pages that
 * actually render an ISHOA Events shortcode, so the rule cannot reach any other
 * page on the site — but it is still the plugin adjusting the theme, so keep it
 * to the one thing it needs to do and nothing more.
 * ------------------------------------------------------------------------ */

.page-header .entry-title {
	padding-top: 44px;
}

@media (max-width: 700px) {
	/* The logo shrinks and the title wraps under it, so the clearance is not
	   needed and would only add dead space. */
	.page-header .entry-title {
		padding-top: 0;
	}
}
