/**
 * iHelp Media — frontend gallery (Phase 3).
 * Clean responsive external gallery: CSS grid, aspect-ratio, lazy loading.
 */

/* Starter story pattern: native blocks, styled by Gallery and fully editable. */
.ihelp-starter-story-hero,
.ihelp-starter-story-gallery-intro,
.ihelp-starter-story-ending {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: 960px;
}

.ihelp-starter-story-hero {
	margin-block: clamp(28px, 6vw, 72px) clamp(34px, 7vw, 80px);
	padding: clamp(32px, 6vw, 68px) clamp(20px, 5vw, 60px);
	border: 1px solid #e7e4dd;
	border-radius: 24px;
	background: #fbfaf6;
	color: #17181c;
}

.ihelp-starter-story-kicker,
.ihelp-starter-story-detail-label {
	color: #9a7100;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.ihelp-starter-story-title {
	margin-block: 12px 16px;
	font-size: clamp(32px, 6vw, 64px);
	line-height: 1.15;
}

.ihelp-starter-story-lead,
.ihelp-starter-story-section-copy {
	max-width: 720px;
	margin-inline: auto;
	color: #6e6b62;
	font-size: clamp(16px, 2.3vw, 20px);
	line-height: 1.9;
}

.ihelp-starter-story-separator {
	width: 72px !important;
	margin-block: 32px !important;
	border-color: #f4c020 !important;
	border-width: 2px 0 0 !important;
}

.ihelp-starter-story-details {
	gap: 0;
	margin-block-end: 0;
}

.ihelp-starter-story-detail {
	padding: 10px 22px;
	border-inline-end: 1px solid #e7e4dd;
}

.ihelp-starter-story-detail:last-child {
	border-inline-end: 0;
}

.ihelp-starter-story-detail-label,
.ihelp-starter-story-detail-value {
	margin-block: 0 5px;
}

.ihelp-starter-story-detail-value {
	color: #17181c;
	font-size: 16px;
	font-weight: 600;
}

.ihelp-starter-story-gallery-intro {
	margin-block-end: 28px;
	padding-inline: 20px;
}

.ihelp-starter-story-section-title {
	margin-block-end: 10px;
	color: #17181c;
	font-size: clamp(27px, 4vw, 42px);
}

.ihelp-starter-story-ending {
	margin-block: clamp(44px, 8vw, 96px);
	padding-inline: 20px;
}

.ihelp-starter-story-quote {
	margin: 0;
	padding: clamp(24px, 5vw, 48px);
	border: 0;
	border-radius: 20px;
	background: #17181c;
	color: #fff;
	text-align: center;
}

.ihelp-starter-story-quote p {
	margin: 0;
	font-size: clamp(20px, 3.5vw, 32px);
	font-weight: 600;
	line-height: 1.6;
}

.ihelp-starter-story-closing {
	margin-block-start: 22px;
	color: #6e6b62;
	font-size: 14px;
}

@media (max-width: 781px) {
	.ihelp-starter-story-hero {
		border-radius: 18px;
	}

	.ihelp-starter-story-detail {
		padding-block: 14px;
		border-inline-end: 0;
		border-block-end: 1px solid #e7e4dd;
	}

	.ihelp-starter-story-detail:last-child {
		border-block-end: 0;
	}
}

/* Midnight Editorial: a complete dark composition that stays intentional on
   both light and dark themes. All colours live inside the pattern boundary. */
.ihelp-pattern-midnight {
	box-sizing: border-box;
	margin-block: 0 !important;
	padding-inline: clamp(20px, 6vw, 76px);
	border-inline: 1px solid #2d2b27;
	background: #0d0d0f;
	color: #f4efe5;
}

.ihelp-pattern-midnight-head {
	margin-block-start: clamp(36px, 7vw, 96px) !important;
	padding-block: clamp(30px, 6vw, 76px) 24px;
	border-block-start: 1px solid #2d2b27;
	border-radius: 4px 4px 0 0;
	box-shadow: 0 -24px 80px rgba(0, 0, 0, .12);
}

.ihelp-pattern-midnight-gallery {
	padding-block: 0;
}

.ihelp-pattern-midnight-foot {
	margin-block-end: clamp(48px, 8vw, 110px) !important;
	padding-block: 0 clamp(34px, 6vw, 76px);
	border-block-end: 1px solid #2d2b27;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
}

.ihelp-pattern-midnight-meta {
	gap: 12px 28px;
	margin-block-end: clamp(44px, 8vw, 94px);
	padding-block-end: 18px;
	border-block-end: 1px solid #3a3731;
}

.ihelp-pattern-midnight-kicker,
.ihelp-pattern-midnight-place,
.ihelp-pattern-midnight-gallery-label,
.ihelp-pattern-midnight-closing {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
}

.ihelp-pattern-midnight-kicker,
.ihelp-pattern-midnight-gallery-label {
	color: #e3b74f;
}

.ihelp-pattern-midnight-place,
.ihelp-pattern-midnight-closing {
	color: #a7a095;
}

.ihelp-pattern-midnight-hero {
	gap: clamp(28px, 6vw, 88px);
	margin-block-end: clamp(40px, 7vw, 84px);
}

.ihelp-pattern-midnight-heading {
	flex-basis: 68% !important;
}

.ihelp-pattern-midnight-lead {
	flex-basis: 32% !important;
}

.ihelp-pattern-midnight-heading h2 {
	max-width: 900px;
	margin: 0;
	color: #fffaf0;
	font-size: clamp(42px, 7.4vw, 92px);
	font-weight: 650;
	line-height: 1.02;
}

.ihelp-pattern-midnight-lead p {
	margin: 0;
	color: #c6c0b5;
	font-size: clamp(16px, 2vw, 20px);
	line-height: 1.85;
}

.ihelp-pattern-midnight-rule {
	width: 100% !important;
	margin-block: 0 20px !important;
	border-color: #3a3731 !important;
}

.ihelp-pattern-midnight-gallery-label {
	margin-block-end: 22px;
}

.ihelp-pattern-midnight .ihelp-gallery {
	margin-block: 0;
}

.ihelp-pattern-midnight-ending {
	margin-block-start: clamp(44px, 8vw, 100px);
	padding-block-start: clamp(32px, 5vw, 60px);
	border-block-start: 1px solid #3a3731;
}

.ihelp-pattern-midnight-quote {
	max-width: 850px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	color: #fffaf0;
	text-align: center;
}

.ihelp-pattern-midnight-quote p {
	margin: 0;
	font-size: clamp(25px, 4vw, 48px);
	font-style: italic;
	font-weight: 500;
	line-height: 1.45;
}

.ihelp-pattern-midnight-closing {
	margin-block-start: 30px;
}

.ihelp-pattern-midnight .components-placeholder,
.ihelp-pattern-midnight .ihelp-gallery-notice {
	border-color: #4c4942;
	background: #18181b;
	color: #f4efe5;
}

/* Gallery Journal: neutral translucent surfaces and inherited text colour let
   the layout belong to light, dark, and custom-colour themes without a toggle. */
.ihelp-pattern-journal {
	box-sizing: border-box;
	margin-block: 0 !important;
	color: inherit;
}

.ihelp-pattern-journal-head {
	margin-block-start: clamp(36px, 7vw, 96px) !important;
	padding-block: clamp(32px, 6vw, 72px) 24px;
	border-block-start: 1px solid rgba(128, 128, 128, .34);
}

.ihelp-pattern-journal-gallery {
	padding-block: 0;
}

.ihelp-pattern-journal-foot {
	margin-block-end: clamp(48px, 8vw, 110px) !important;
	padding-block-end: clamp(32px, 6vw, 72px);
	border-block-end: 1px solid rgba(128, 128, 128, .34);
}

.ihelp-pattern-journal-intro {
	gap: clamp(32px, 7vw, 104px);
	margin-block-end: clamp(38px, 7vw, 84px);
}

.ihelp-pattern-journal-index {
	flex-basis: 24% !important;
	padding-inline-end: clamp(18px, 4vw, 48px);
	border-inline-end: 1px solid rgba(128, 128, 128, .34);
}

.ihelp-pattern-journal-copy {
	flex-basis: 76% !important;
}

.ihelp-pattern-journal-number {
	margin: 0;
	font-size: clamp(76px, 12vw, 150px);
	font-weight: 300;
	line-height: .75;
	opacity: .16;
}

.ihelp-pattern-journal-kicker {
	margin: 30px 0 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.55;
	text-transform: uppercase;
	opacity: .68;
}

.ihelp-pattern-journal-copy h2 {
	max-width: 880px;
	margin: 0;
	color: inherit;
	font-size: clamp(38px, 6.5vw, 78px);
	font-weight: 650;
	line-height: 1.08;
}

.ihelp-pattern-journal-lead {
	max-width: 720px;
	margin-block: 28px 0;
	font-size: clamp(17px, 2.2vw, 22px);
	line-height: 1.85;
	opacity: .72;
}

.ihelp-pattern-journal-note {
	box-sizing: border-box;
	margin-block-end: clamp(26px, 5vw, 52px);
	padding: 20px clamp(20px, 4vw, 42px);
	border-inline-start: 4px solid #d6a72f;
	background: rgba(128, 128, 128, .1);
}

.ihelp-pattern-journal-note p {
	margin: 0;
	font-size: 15px;
	line-height: 1.75;
	opacity: .8;
}

.ihelp-pattern-journal .ihelp-gallery {
	margin-block: 0;
}

.ihelp-pattern-journal-ending {
	gap: clamp(36px, 8vw, 120px);
	margin-block: clamp(48px, 8vw, 100px) 0;
	padding-block-start: clamp(30px, 5vw, 52px);
	border-block-start: 1px solid rgba(128, 128, 128, .34);
}

.ihelp-pattern-journal-quote {
	flex-basis: 68% !important;
}

.ihelp-pattern-journal-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
}

.ihelp-pattern-journal-quote p {
	margin: 0;
	font-size: clamp(24px, 3.8vw, 44px);
	font-weight: 550;
	line-height: 1.45;
}

.ihelp-pattern-journal-details {
	flex-basis: 32% !important;
	padding-inline-start: clamp(18px, 4vw, 48px);
	border-inline-start: 1px solid rgba(128, 128, 128, .34);
}

.ihelp-pattern-journal-details p {
	margin-block: 0 24px;
	font-size: 14px;
	line-height: 1.75;
	opacity: .72;
}

.ihelp-pattern-journal-details strong {
	font-size: 12px;
	text-transform: uppercase;
}

.ihelp-pattern-journal .components-placeholder,
.ihelp-pattern-journal .ihelp-gallery-notice {
	border-color: rgba(128, 128, 128, .48);
	background: rgba(128, 128, 128, .1);
	color: inherit;
}

@media (max-width: 781px) {
	.ihelp-pattern-midnight {
		padding-inline: 20px;
	}

	.ihelp-pattern-midnight-head,
	.ihelp-pattern-journal-head {
		margin-block-start: 28px !important;
	}

	.ihelp-pattern-midnight-head {
		padding-block-start: 28px;
	}

	.ihelp-pattern-midnight-foot,
	.ihelp-pattern-journal-foot {
		margin-block-end: 56px !important;
	}

	.ihelp-pattern-midnight-foot {
		padding-block-end: 40px;
	}

	.ihelp-pattern-midnight-meta {
		margin-block-end: 44px;
	}

	.ihelp-pattern-midnight-hero,
	.ihelp-pattern-journal-intro,
	.ihelp-pattern-journal-ending {
		gap: 28px;
	}

	.ihelp-pattern-journal-index,
	.ihelp-pattern-journal-details {
		padding-inline: 0;
		border-inline: 0;
	}

	.ihelp-pattern-journal-index {
		padding-block-end: 26px;
		border-block-end: 1px solid rgba(128, 128, 128, .34);
	}

	.ihelp-pattern-journal-number {
		font-size: 76px;
	}

	.ihelp-pattern-journal-kicker {
		margin-block-start: 20px;
	}
}

.ihelp-gallery {
	--ihelp-cols: 4;
	--ihelp-cols-lap: var(--ihelp-cols);
	--ihelp-cols-tab: 2;
	--ihelp-cols-mob: 1;
	--ihelp-gap: 10px;
	/* Each screen size carries its own explicit column count, set per
	   gallery from the block's four Columns fields. */
	--ihelp-cols-eff: var(--ihelp-cols);
	display: grid;
	grid-template-columns: repeat(var(--ihelp-cols-eff), 1fr);
	gap: var(--ihelp-gap);
	margin: 1.5em 0;
}

.ihelp-gallery-item {
	margin: 0;
	position: relative;
	overflow: hidden;
	/* Placeholder tile shown before the thumbnail arrives (and for any photo
	   with no thumbnail). A translucent neutral, not a fixed colour, so it
	   works on any theme — a soft tint on Ali's clients' dark pages and on
	   light ones alike, instead of a light-grey block that only suited light
	   backgrounds. */
	background: rgba(128, 128, 128, 0.16);
	border-radius: var(--ihelp-radius, 0px);
}

.ihelp-gallery .ihelp-gallery-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: transparent;
	/* Sit above the blurred placeholder. */
	position: relative;
	z-index: 1;
	/* Clip only the image pixels. Putting clip-path on the masonry item breaks
	   pointer hit-testing in Safari's later columns. Keep the image itself as
	   the hit target so Safari can offer its native Save Image menu; ordinary
	   clicks still bubble to the surrounding lightbox link. */
	border-radius: var(--ihelp-radius, 0px) !important;
	-webkit-border-radius: var(--ihelp-radius, 0px) !important;
	-webkit-clip-path: inset(0 round var(--ihelp-radius, 0px));
	clip-path: inset(0 round var(--ihelp-radius, 0px));
	pointer-events: auto;
	-webkit-touch-callout: default !important;
	-webkit-user-select: auto;
	user-select: auto;
}

.ihelp-gallery-link {
	display: block;
	position: relative;
	z-index: 1;
	border-radius: var(--ihelp-radius, 0px);
	-webkit-border-radius: var(--ihelp-radius, 0px);
	overflow: hidden;
	overflow: clip;
	contain: paint;
	transform: translateZ(0);
}

/* Blur-up placeholder: the thumbnail, blown up and blurred, behind the photo.
   Scaled slightly so the blur's soft edges never reveal the tile behind it. */
.ihelp-gallery-blur {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(14px);
	transform: scale(1.08);
	border-radius: var(--ihelp-radius, 0px);
	z-index: 0;
	pointer-events: none;
}
.ihelp-gallery-item.is-image-loaded {
	background: transparent;
}
.ihelp-gallery-item.is-image-loaded .ihelp-gallery-blur {
	opacity: 0;
	visibility: hidden;
}

/* Captions */
.ihelp-gallery-caption {
	font-size: 12px;
	color: #555;
	margin-top: 4px;
	line-height: 1.3;
}

/* Fade images in as they decode. The images start hidden ONLY once the script
   has marked the gallery ready (ihelp-fade-on); if the script never runs, is
   slow, or is blocked, the images stay fully visible rather than vanishing —
   a fade is a nicety, never a reason to show a blank gallery. */
.ihelp-gallery.ihelp-fade-on .ihelp-gallery-img {
	opacity: 0;
	transition: opacity .4s ease, transform .8s cubic-bezier(.22, 1, .36, 1), filter .32s ease;
}
.ihelp-gallery.ihelp-fade-on .ihelp-gallery-img.is-loaded {
	opacity: 1;
}

/* Optional desktop mouseover effects. Touch devices never receive them. */
.ihelp-click-same_image .ihelp-gallery-link,
.ihelp-click-lightbox .ihelp-gallery-link { cursor: pointer; }
.ihelp-gallery .ihelp-gallery-img {
	transition: transform .8s cubic-bezier(.22, 1, .36, 1), filter .32s ease;
	transform-origin: 50% 50%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
@media (hover: hover) and (pointer: fine) {
	/* The link owns a fixed paint-clipping layer, so Safari can enlarge the
	   image without changing the visible frame or shifting masonry tiles. */
	.ihelp-hover-zoom .ihelp-gallery-item:hover .ihelp-gallery-img {
		transform: scale(1.035);
	}
	.ihelp-hover-darken .ihelp-gallery-item:hover .ihelp-gallery-img { filter: brightness(.78); }
	.ihelp-hover-grayscale .ihelp-gallery-item:hover .ihelp-gallery-img { filter: grayscale(1); }
}

/* Masonry via CSS columns */
.ihelp-gallery.ihelp-layout-masonry {
	display: block;
	column-count: var(--ihelp-cols-eff);
	column-gap: var(--ihelp-gap);
}
.ihelp-gallery.ihelp-layout-masonry .ihelp-gallery-item {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	display: inline-block;
	width: 100%;
	vertical-align: top;
	margin: 0 0 var(--ihelp-gap);
}
/* The complete gallery follows its global or per-block maximum width. "none"
   leaves sizing to the theme; every explicit width remains centered. */
.ihelp-gallery {
	max-width: var(--ihelp-max-width, none);
	margin-inline: auto;
}
.ihelp-gallery.ihelp-layout-masonry .ihelp-gallery-img {
	/* Each photo's true ratio (set inline as --ihelp-ar) reserves its slot
	   before it loads, so nothing jumps. Falls back to auto if a photo has no
	   stored dimensions. */
	aspect-ratio: var(--ihelp-ar, auto);
	height: auto;
	margin: 0 !important;
	vertical-align: top;
}

/* Justified: equal-height rows whose image widths respond to the original
   photo ratios. The last row stays natural instead of stretching awkwardly. */
.ihelp-gallery.ihelp-layout-justified {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--ihelp-gap);
}
.ihelp-gallery.ihelp-layout-justified::after {
	content: "";
	flex: 999 1 240px;
	height: 0;
}
.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-item {
	flex-grow: var(--ihelp-ratio, 1.5);
	flex-shrink: 1;
	flex-basis: clamp(180px, calc(100% / var(--ihelp-cols-eff)), 340px);
	height: clamp(180px, 22vw, 280px);
}
.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-link {
	height: 100%;
}
.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}
.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 2;
	margin: 0;
	padding: 24px 12px 10px;
	color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, .64));
}

/* Carousel: horizontal scroll-snap */
.ihelp-gallery.ihelp-layout-carousel {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: var(--ihelp-gap);
}
.ihelp-gallery.ihelp-layout-carousel .ihelp-gallery-item {
	flex: 0 0 calc((100% - (var(--ihelp-cols-eff) - 1) * var(--ihelp-gap)) / var(--ihelp-cols-eff));
	scroll-snap-align: start;
}

.ihelp-gallery-notice {
	color: #646970;
	font-style: italic;
	padding: 12px;
	border: 1px dashed #c3c4c7;
	border-radius: var(--ihelp-radius, 0px);
}

/* Lightbox */
.ihelp-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 4vh 4vw;
	cursor: zoom-out;
}
.ihelp-lightbox[hidden] { display: none; }
.ihelp-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: var(--ihelp-radius, 0px);
	pointer-events: auto;
	-webkit-touch-callout: default !important;
	-webkit-user-select: auto;
	user-select: auto;
}
.ihelp-lightbox-close {
	position: absolute;
	top: 16px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
}

/* Responsive: cap columns on smaller screens (never raise a lower setting) */
@media (max-width: 1200px) {
	.ihelp-gallery { --ihelp-cols-eff: var(--ihelp-cols-lap); }
}
@media (max-width: 782px) {
	.ihelp-gallery { --ihelp-cols-eff: var(--ihelp-cols-tab); }
}
@media (max-width: 480px) {
	.ihelp-gallery { --ihelp-cols-eff: var(--ihelp-cols-mob); }
	.ihelp-gallery.ihelp-layout-justified::after { display: none; }
	.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-item {
		flex-basis: 100%;
		height: auto;
	}
	.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-link { height: auto; }
	.ihelp-gallery.ihelp-layout-justified .ihelp-gallery-img {
		height: auto;
		aspect-ratio: var(--ihelp-ar, 4 / 3);
		object-fit: cover;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihelp-gallery .ihelp-gallery-img,
	.ihelp-gallery.ihelp-fade-on .ihelp-gallery-img { transition: none; }
}

/* Quiet iHelp Media signature. It follows the gallery instead of covering a
   photo, stays deliberately small, and keeps the product name isolated from
   surrounding RTL text. */
.ihelp-gallery-branding {
	direction: ltr;
	display: grid;
	grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
	align-items: center;
	gap: 16px;
	max-width: var(--ihelp-max-width, none);
	margin: 0 auto 1.5em;
	padding-top: 12px;
	color: inherit;
	opacity: 0.72;
	font-family: inherit;
}

/* Singular posts carry one hosting signature after the complete content,
   regardless of how many Gallery blocks or imported legacy images they use. */
.ihelp-gallery-branding.ihelp-post-branding {
	width: 100%;
	margin-top: 1.5em;
}

.ihelp-gallery-branding-rule,
.ihelp-gallery-branding::after {
	display: block;
	height: 1px;
	background: rgba(128, 128, 128, 0.24);
}

.ihelp-gallery-branding::after {
	content: "";
}

.ihelp-gallery-branding-lockup {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
}

.ihelp-gallery-branding-mark {
	display: inline-grid;
	place-items: center;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: #f4c020;
	color: #17181c;
	font-family: Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.ihelp-gallery-branding-copy {
	display: block;
	text-align: start;
	font-size: 10px;
	line-height: 1.15;
}

.ihelp-gallery-branding-label {
	display: block;
	opacity: 0.68;
}

.ihelp-gallery-branding-name {
	display: block;
	margin-top: 1px;
	font-size: 11px;
	font-weight: 600;
}

.ihelp-gallery-branding-lockup[dir="rtl"] .ihelp-gallery-branding-name {
	text-align: right;
}

@media (max-width: 480px) {
	.ihelp-gallery:has(+ .ihelp-gallery-branding) {
		margin-bottom: 0;
	}
	.ihelp-gallery-branding {
		grid-template-columns: minmax(12px, 1fr) auto minmax(12px, 1fr);
		gap: 10px;
		/* Keep the signature close enough to read as part of the gallery. */
		padding-top: 6px;
	}
	.ihelp-gallery-branding.ihelp-post-branding {
		margin-top: 1em;
	}
}

/* ==========================================================================
 * Password lock screen — shown in place of a gallery whose event is locked.
 * Design goals: on-brand (gold mark), quiet by default (a single card, no
 * chrome), full-width friendly, and theme-aware so it sits well on the light
 * hosting site as it does on Ali's clients' darker themes.
 * ========================================================================== */
.ihelp-gate {
	--ihg-ink: #17181c;
	--ihg-muted: #666a72;
	--ihg-card: #ffffff;
	--ihg-border: rgba(23, 24, 28, 0.08);
	--ihg-shadow: 0 30px 60px -20px rgba(23, 24, 28, 0.25), 0 2px 8px rgba(23, 24, 28, 0.06);
	--ihg-accent: #f4c020;
	--ihg-danger: #b3261e;
	--ihg-input-bg: #fafafa;
	--ihg-input-border: rgba(23, 24, 28, 0.12);
	--ihg-input-focus: rgba(244, 192, 32, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 20px;
	margin: 1.5em 0;
	font-family: inherit;
}
@media (prefers-color-scheme: dark) {
	.ihelp-gate {
		--ihg-ink: #f7f8fa;
		--ihg-muted: #9aa0aa;
		--ihg-card: #1c1e24;
		--ihg-border: rgba(255, 255, 255, 0.08);
		--ihg-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
		--ihg-input-bg: rgba(255, 255, 255, 0.04);
		--ihg-input-border: rgba(255, 255, 255, 0.1);
	}
}

.ihelp-gate-card {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: var(--ihg-card);
	color: var(--ihg-ink);
	border: 1px solid var(--ihg-border);
	border-radius: 18px;
	box-shadow: var(--ihg-shadow);
	padding: 32px 28px 28px;
	text-align: center;
	transition: transform .22s ease, opacity .22s ease;
}
.ihelp-gate-card.is-shaking { animation: ihelp-gate-shake .35s cubic-bezier(.36,.07,.19,.97); }
.ihelp-gate-card.is-unlocking { transform: scale(.98); opacity: 0; }

@keyframes ihelp-gate-shake {
	10%, 90% { transform: translateX(-2px); }
	20%, 80% { transform: translateX(3px); }
	30%, 50%, 70% { transform: translateX(-5px); }
	40%, 60% { transform: translateX(5px); }
}

.ihelp-gate-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 14px;
	background: var(--ihg-accent);
	color: var(--ihg-ink);
}
.ihelp-gate-event {
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--ihg-muted);
	margin: 0 0 6px;
}
.ihelp-gate-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ihg-ink);
	margin: 0 0 6px;
}
.ihelp-gate-sub {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ihg-muted);
	margin: 0 0 22px;
}

.ihelp-gate-form { text-align: start; }
.ihelp-gate-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ihg-muted);
	margin: 0 0 6px;
}
.ihelp-gate-field {
	position: relative;
	display: flex;
	align-items: center;
}
.ihelp-gate-input {
	flex: 1;
	width: 100%;
	box-sizing: border-box;
	background: var(--ihg-input-bg);
	color: var(--ihg-ink);
	border: 1.5px solid var(--ihg-input-border);
	border-radius: 12px;
	padding: 12px 44px 12px 14px;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.ihelp-gate-input:focus {
	outline: none;
	border-color: var(--ihg-accent);
	background: var(--ihg-card);
	box-shadow: 0 0 0 4px var(--ihg-input-focus);
}
[dir="rtl"] .ihelp-gate-input { padding: 12px 14px 12px 44px; }

.ihelp-gate-reveal {
	position: absolute;
	inset-inline-end: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: transparent;
	border: 0;
	border-radius: 10px;
	color: var(--ihg-muted);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.ihelp-gate-reveal:hover { background: rgba(128, 128, 128, .12); color: var(--ihg-ink); }
.ihelp-gate-reveal:focus-visible { outline: 2px solid var(--ihg-accent); outline-offset: 2px; }

.ihelp-gate-error {
	min-height: 20px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--ihg-danger);
	margin: 8px 2px 0;
	opacity: 0;
	transition: opacity .15s ease;
}
.ihelp-gate-error.is-visible { opacity: 1; }

.ihelp-gate-submit {
	position: relative;
	display: block;
	width: 100%;
	margin-top: 18px;
	padding: 12px 20px;
	background: var(--ihg-ink);
	color: var(--ihg-card);
	border: 0;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: transform .1s ease, opacity .15s ease, background-color .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.ihelp-gate-submit:hover { transform: translateY(-1px); }
.ihelp-gate-submit:active { transform: translateY(0); }
.ihelp-gate-submit:focus-visible { outline: 2px solid var(--ihg-accent); outline-offset: 2px; }
.ihelp-gate-submit:disabled { opacity: .55; cursor: wait; transform: none; }

.ihelp-gate-spinner {
	position: absolute;
	inset-inline-end: 16px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: var(--ihg-card);
	border-radius: 50%;
	opacity: 0;
	animation: ihelp-gate-spin .7s linear infinite;
	transition: opacity .15s ease;
}
.ihelp-gate-submit.is-loading .ihelp-gate-spinner { opacity: 1; }
.ihelp-gate-submit.is-loading .ihelp-gate-submit-label { opacity: .35; }
.ihelp-gate-submit-label { transition: opacity .15s ease; }

@keyframes ihelp-gate-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.ihelp-gate-card, .ihelp-gate-submit, .ihelp-gate-input, .ihelp-gate-reveal, .ihelp-gate-error, .ihelp-gate-spinner { transition: none; animation: none; }
	.ihelp-gate-card.is-shaking { animation: none; }
}
