/* EZFormz Help Center — generated pages and progressive search */

:root {
	--help-content: 1120px;
	--help-reading: 720px;
	--help-accent-soft: var(--primary-light);
	--help-accent-border: var(--border-strong);
}

@supports (color: color-mix(in srgb, white, black)) {
	:root {
		--help-accent-soft: color-mix(in srgb, var(--primary) 10%, var(--bg-surface));
		--help-accent-border: color-mix(in srgb, var(--primary) 28%, var(--border));
	}
}

.help-page {
	background:
		radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--primary) 8%, transparent) 0, transparent 32rem),
		var(--bg-app);
}

.help-page a {
	text-underline-offset: 0.17em;
}

.help-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--text);
	color: var(--bg-surface);
	font-weight: 700;
	transform: translateY(-160%);
}

.help-skip-link:focus {
	transform: translateY(0);
}

.help-main {
	width: min(calc(100% - 40px), var(--help-content));
	margin: 0 auto;
	padding: 48px 0 72px;
}

.help-legacy-status {
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 2px solid var(--primary);
	border-radius: 12px;
	background: var(--help-accent-soft);
	color: var(--text);
}

.help-legacy-status[hidden] {
	display: none;
}

.help-noscript-directory .help-legacy-topic:target {
	padding: 8px;
	outline: 3px solid var(--primary);
	outline-offset: 3px;
	background: var(--help-accent-soft);
}

.help-environment-notes {
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--help-accent-border);
	border-radius: 14px;
	background: var(--help-accent-soft);
}

.help-environment-notes h2 {
	margin-top: 0;
}

.help-eyebrow {
	margin: 0 0 6px;
	color: var(--primary);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.help-hero {
	position: relative;
	overflow: visible;
	padding: clamp(36px, 7vw, 72px);
	border: 1px solid var(--help-accent-border);
	border-radius: 24px;
	background:
		linear-gradient(135deg, var(--help-accent-soft), var(--bg-surface) 58%),
		var(--bg-surface);
	box-shadow: var(--shadow-md);
	text-align: center;
}

.help-hero h1,
.help-page-header h1,
.help-article-header h1 {
	color: var(--text);
	font-size: clamp(2rem, 6vw, 3.65rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.help-hero > p:not(.help-eyebrow),
.help-page-header > p:not(.help-eyebrow) {
	max-width: 660px;
	margin: 14px auto 0;
	color: var(--text-muted);
	font-size: clamp(1rem, 2vw, 1.15rem);
}

.help-search-form {
	position: relative;
	z-index: 10;
	max-width: 760px;
	margin: 28px auto 0;
	text-align: left;
}

.help-search-form > label {
	display: block;
	margin-bottom: 8px;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 700;
}

.help-hero .help-search-form > label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.help-search-control {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.help-search-control input {
	min-width: 0;
	height: 54px;
	padding: 0 18px;
	border: 1px solid var(--text-muted);
	border-radius: 12px;
	background: var(--bg-surface);
	color: var(--text);
	font: inherit;
	font-size: 1rem;
	box-shadow: var(--shadow);
}

.help-search-control input:focus {
	border-color: var(--primary);
	outline: 3px solid var(--primary);
	outline-offset: 1px;
}

.help-search-control input:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.help-search-control > button {
	min-width: 108px;
	min-height: 54px;
	padding: 0 20px;
	border: 1px solid var(--primary);
	border-radius: 12px;
	background: var(--primary);
	color: var(--primary-fg);
	font: inherit;
	font-weight: 750;
	cursor: pointer;
}

.help-search-control > button:hover {
	background: var(--primary-hover);
}

.help-page .btn-primary,
.help-page .nav-links a.btn,
.help-page .nav-links a.btn:hover {
	color: var(--primary-fg);
}

.help-search-control > button:focus-visible,
.help-card:focus-visible,
.help-page a:focus-visible {
	outline: 3px solid var(--primary);
	outline-offset: 3px;
}

.help-search-suggestions {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 116px;
	z-index: 20;
	max-height: min(420px, 60vh);
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	border: 1px solid var(--border-strong);
	border-radius: 12px;
	background: var(--bg-surface);
	box-shadow: var(--shadow-lg);
}

.help-search-suggestions[hidden] {
	display: none;
}

.help-search-suggestions li {
	margin: 0;
}

.help-search-suggestion {
	display: grid;
	gap: 2px;
	width: 100%;
	min-height: 52px;
	padding: 9px 11px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.help-search-suggestion:hover,
.help-search-suggestion[aria-selected="true"] {
	background: var(--help-accent-soft);
}

.help-search-suggestion[aria-selected="true"] {
	box-shadow: inset 3px 0 0 var(--primary);
}

.help-search-suggestion strong {
	font-size: 0.92rem;
}

.help-search-suggestion span {
	color: var(--text-muted);
	font-size: 0.78rem;
}

.help-search-privacy,
.help-search-status {
	margin: 8px 2px 0;
	color: var(--text-muted);
	font-size: 0.78rem;
}

.help-search-status:empty {
	display: none;
}

.help-section {
	margin-top: clamp(48px, 8vw, 80px);
}

.help-section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

.help-section-heading h2,
.help-support-card h2,
.help-article-related h2 {
	color: var(--text);
	font-size: clamp(1.45rem, 3vw, 2rem);
	line-height: 1.2;
}

.help-section-heading > a {
	color: var(--primary);
	font-size: 0.9rem;
	font-weight: 700;
}

.help-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.help-card-grid li {
	min-width: 0;
}

.help-card {
	display: flex;
	min-height: 100%;
	padding: 22px;
	flex-direction: column;
	gap: 8px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--bg-surface);
	box-shadow: var(--shadow);
	color: var(--text);
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.help-card:hover {
	border-color: var(--help-accent-border);
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

.help-card-kicker,
.help-card-meta {
	color: var(--primary);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.help-card strong {
	font-size: 1.08rem;
	line-height: 1.3;
}

.help-card > span:not(.help-card-kicker):not(.help-card-meta):not(.help-card-action) {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.help-card-action {
	margin-top: auto;
	padding-top: 8px;
	color: var(--primary);
	font-size: 0.83rem;
	font-weight: 700;
}

.help-support-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	margin-top: clamp(48px, 8vw, 80px);
	padding: clamp(24px, 5vw, 40px);
	border: 1px solid var(--help-accent-border);
	border-radius: 20px;
	background: var(--help-accent-soft);
}

.help-support-card p:not(.help-eyebrow) {
	max-width: 680px;
	margin-top: 8px;
	color: var(--text);
}

.help-support-card .btn {
	flex: none;
}

.help-footer {
	padding: 28px 20px 40px;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.82rem;
	text-align: center;
}

.help-footer a {
	color: inherit;
}

.help-breadcrumb {
	margin-bottom: 32px;
	font-size: 0.82rem;
}

.help-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.help-breadcrumb li:not(:last-child)::after {
	margin-left: 6px;
	color: var(--text-faint);
	content: "/";
}

.help-breadcrumb a {
	color: var(--text-muted);
}

.help-breadcrumb span {
	color: var(--text);
}

.help-page-header {
	max-width: 760px;
	margin: 0 auto 36px;
	text-align: center;
}

.help-search-main > .help-search-form {
	margin-bottom: 48px;
}

.help-search-results {
	min-height: 280px;
}

.help-result-list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.help-result {
	display: block;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--bg-surface);
	color: var(--text);
	text-decoration: none;
	box-shadow: var(--shadow);
}

.help-result:hover {
	border-color: var(--help-accent-border);
}

.help-result-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 5px;
	color: var(--primary);
	font-size: 0.74rem;
	font-weight: 750;
	text-transform: uppercase;
}

.help-result h3 {
	margin: 0;
	font-size: 1.12rem;
}

.help-result p {
	margin: 6px 0 0;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.help-result mark {
	border-radius: 3px;
	background: var(--warn-bg);
	color: inherit;
}

.help-zero-state,
.help-search-error {
	padding: 26px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--bg-surface);
}

.help-zero-state h3,
.help-search-error h3 {
	margin-bottom: 8px;
}

.help-zero-state ul,
.help-search-error ul,
.help-noscript-directory ul {
	margin: 14px 0 0;
	padding-left: 20px;
}

.help-legacy-terms {
	display: block;
	margin-top: 2px;
	color: var(--text-muted);
	font-size: 0.78rem;
}

.help-support-inline {
	margin-top: 32px;
	padding: 18px 20px;
	border-left: 4px solid var(--primary);
	border-radius: 0 10px 10px 0;
	background: var(--help-accent-soft);
	color: var(--text);
}

.help-support-inline a {
	color: var(--primary);
	font-weight: 700;
}

.help-article-main {
	max-width: var(--help-content);
}

.help-article-layout {
	display: grid;
	grid-template-columns: minmax(0, var(--help-reading)) minmax(180px, 260px);
	gap: clamp(36px, 7vw, 72px);
	align-items: start;
	justify-content: center;
}

.help-article {
	min-width: 0;
	grid-column: 1;
	grid-row: 1;
}

.help-article-header {
	padding-bottom: 30px;
	border-bottom: 1px solid var(--border);
}

.help-article-header h1 {
	font-size: clamp(2rem, 5vw, 3.15rem);
}

.help-article-outcome {
	margin-top: 18px;
	padding: 16px 18px;
	border-left: 4px solid var(--primary);
	border-radius: 0 10px 10px 0;
	background: var(--help-accent-soft);
	color: var(--text);
}

.help-article-outcome strong {
	color: var(--text);
}

.help-article-body {
	font-size: 1rem;
	line-height: 1.75;
}

.help-article-body h2 {
	margin: 44px 0 14px;
	color: var(--text);
	font-size: 1.65rem;
	line-height: 1.25;
	scroll-margin-top: 88px;
}

.help-article-body h3 {
	margin: 30px 0 10px;
	font-size: 1.2rem;
	scroll-margin-top: 88px;
}

.help-article-body p,
.help-article-body ul,
.help-article-body ol,
.help-article-body pre {
	margin: 0 0 18px;
}

.help-article-body ul,
.help-article-body ol {
	padding-left: 26px;
}

.help-article-body li + li {
	margin-top: 8px;
}

.help-article-body a {
	color: var(--primary);
	font-weight: 650;
}

.help-article-body code,
.help-review-info code {
	padding: 0.12em 0.35em;
	border-radius: 5px;
	background: var(--bg-sunken);
	color: var(--text);
	font-size: 0.9em;
	overflow-wrap: anywhere;
}

.help-article-body pre {
	max-width: 100%;
	padding: 16px;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg-sunken);
}

.help-article-body pre code {
	padding: 0;
	background: transparent;
}

.help-outline {
	position: sticky;
	top: 88px;
	grid-column: 2;
	grid-row: 1;
}

.help-outline nav {
	padding-left: 18px;
	border-left: 1px solid var(--border);
}

.help-outline h2 {
	margin-bottom: 10px;
	font-size: 0.76rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.help-outline ol {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.help-outline-level-3 {
	padding-left: 12px;
}

.help-outline a {
	display: block;
	color: var(--text-muted);
	font-size: 0.82rem;
	line-height: 1.35;
	text-decoration: none;
}

.help-outline a:hover,
.help-outline a[aria-current="location"] {
	color: var(--primary);
}

.help-article-footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.help-review-info {
	color: var(--text-muted);
	font-size: 0.78rem;
}

.help-article-related {
	margin-top: 36px;
}

.help-article-related .help-card-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 14px;
}

.help-noscript-directory {
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--bg-surface);
}

.help-not-found {
	max-width: 720px;
	padding-top: clamp(64px, 12vw, 128px);
	text-align: center;
}

.help-not-found h1 {
	font-size: clamp(2.2rem, 7vw, 4rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.help-not-found > p:not(.help-eyebrow) {
	max-width: 600px;
	margin: 16px auto 0;
	color: var(--text-muted);
}

.help-not-found-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 28px;
}

.help-not-found .help-support-inline {
	margin-top: 56px;
	text-align: left;
}

.help-not-found .help-support-inline h2 {
	font-size: 1.1rem;
}

@media (max-width: 840px) {
	.help-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.help-article-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.help-article {
		grid-column: 1;
		grid-row: 1;
	}

	.help-outline {
		position: static;
		grid-column: 1;
		grid-row: 2;
	}

	.help-outline nav {
		padding: 16px 18px;
		border: 1px solid var(--border);
		border-radius: 12px;
		background: var(--bg-surface);
	}

	.help-outline ol {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.help-main {
		width: min(calc(100% - 28px), var(--help-content));
		padding-top: 28px;
	}

	.help-hero {
		padding: 30px 18px;
		border-radius: 18px;
	}

	.help-search-control {
		grid-template-columns: minmax(0, 1fr);
	}

	.help-search-control > button {
		width: 100%;
	}

	.help-search-suggestions {
		right: 0;
	}

	.help-card-grid,
	.help-article-related .help-card-grid,
	.help-outline ol {
		grid-template-columns: minmax(0, 1fr);
	}

	.help-section-heading,
	.help-support-card {
		align-items: flex-start;
		flex-direction: column;
	}

	.help-support-card .btn {
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.help-card:hover {
		transform: none;
	}
}

@media (prefers-contrast: more) {
	.help-card,
	.help-search-control input,
	.help-search-suggestions,
	.help-result,
	.help-support-card {
		border-width: 2px;
		border-color: var(--text);
	}

	.help-search-suggestion[aria-selected="true"] {
		outline: 2px solid var(--text);
		outline-offset: -2px;
	}

	.help-page a {
		text-decoration-thickness: 2px;
	}
}

@media print {
	.help-page {
		--bg-app: #fff;
		--bg-surface: #fff;
		--bg-surface-2: #fff;
		--bg-sunken: #fff;
		--bg-hover: #fff;
		--border: #777;
		--border-strong: #555;
		--text: #000;
		--text-muted: #222;
		--text-faint: #333;
		--primary: #000;
		--help-accent-soft: #fff;
		background: #fff;
		color: #000;
	}

	.help-page .nav,
	.help-page .help-search-form,
	.help-page .help-outline,
	.help-page .help-support-card,
	.help-page .help-support-inline,
	.help-page .help-footer {
		display: none !important;
	}

	.help-main,
	.help-article-layout,
	.help-article {
		display: block;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
	}

	.help-page a {
		color: #000;
		text-decoration: underline;
	}

	.help-card,
	.help-article-outcome {
		border-color: #777;
		background: #fff;
		color: #000;
		box-shadow: none;
	}
}
