.gk-form {
	--gk-form-border: var(--color-rule);
	--gk-form-focus: var(--color-focus);
	--gk-form-red: var(--color-action);
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
	margin-block: 2rem;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	border: 1px solid var(--color-rule);
	border-radius: var(--radius-card);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
}

/* The shortcode owns its surface; avoid a second padded card around it. */
.gk-form-wrap.gk-card {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.gk-form-wrap.gk-card::before {
	display: none;
}

.gk-form-wrap.gk-card:hover {
	transform: none;
	box-shadow: none;
}

.gk-form-wrap.gk-card > .gk-form {
	max-width: none;
	margin: 0;
}

.gk-form-wrap .gk-form-privacy {
	margin-top: var(--space-sm);
}

.gk-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.gk-form-field {
	display: grid;
	gap: 0.5rem;
	min-width: 0;
}

.gk-form-field label,
.gk-form-field legend {
	font-weight: 700;
	color: var(--color-ink);
}

.gk-form-field fieldset {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.gk-form input[type="text"],
.gk-form input[type="email"],
.gk-form input[type="tel"],
.gk-form select,
.gk-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 3rem;
	padding: 0.75rem 0.875rem;
	font: inherit;
	color: var(--color-ink);
	background: var(--color-surface);
	border: 1px solid var(--gk-form-border);
	border-radius: var(--radius-input);
	outline: 2px solid transparent;
	transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.gk-form input[type="text"]:hover,
.gk-form input[type="email"]:hover,
.gk-form input[type="tel"]:hover,
.gk-form select:hover,
.gk-form textarea:hover {
	border-color: var(--color-rule-2);
}

.gk-form input:disabled,
.gk-form select:disabled,
.gk-form textarea:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	background: var(--color-paper-3);
}

.gk-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.gk-form input:focus-visible,
.gk-form select:focus-visible,
.gk-form textarea:focus-visible,
.gk-form button:focus-visible,
.gk-form a:focus-visible {
	outline: 2px solid var(--gk-form-focus);
	outline-offset: 1px;
	border-color: var(--gk-form-focus);
}

.gk-required,
.gk-optional {
	display: inline-block;
	margin-inline-start: 0.35rem;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	font-size: 0.75em;
	line-height: 1.4;
	vertical-align: 0.08em;
}

.gk-required {
	color: var(--color-action-ink);
	background: var(--gk-form-red);
}

.gk-optional {
	color: var(--color-ink-2);
	background: var(--color-paper-2);
}

.gk-form-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 2.75rem;
}

.gk-form-choice input {
	inline-size: 1.15rem;
	block-size: 1.15rem;
}

.gk-form-consent {
	padding: 1rem;
	border: 1px solid var(--color-rule);
	border-radius: var(--radius-input);
	background: var(--color-paper-2);
}

.gk-form-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-weight: 700;
}

.gk-form-consent input {
	flex: 0 0 auto;
	inline-size: 1.15rem;
	block-size: 1.15rem;
	margin-top: 0.2rem;
}

.gk-form-consent small {
	display: block;
	margin-top: 0.25rem;
	color: var(--color-muted);
	font-size: var(--text-sm);
	font-weight: 400;
	line-height: 1.65;
}

.gk-form-note {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.9rem;
}

.gk-form-submit {
	text-align: center;
}

.gk-form-submit button {
	min-height: 3.25rem;
	padding: 0.85rem 1rem;
	color: var(--color-action-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	white-space: nowrap;
	background: var(--gk-form-red);
	border: 2px solid var(--gk-form-red);
	border-radius: var(--radius-pill);
	cursor: pointer;
	transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.gk-form-submit button:hover {
	background: var(--color-action-hover);
	border-color: var(--color-action-hover);
	box-shadow: var(--shadow-button);
	transform: translateY(-1px);
}

.gk-form-submit button:active {
	box-shadow: none;
	transform: translateY(0);
}

.gk-form-submit button:disabled,
.gk-form-submit button[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.55;
	background: var(--color-muted);
	border-color: var(--color-muted);
}

.gk-form-honeypot {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	white-space: nowrap !important;
}

.gk-form-notice {
	margin-block: 1rem;
	padding: 1rem 1.25rem;
	border-inline-start: 4px solid;
	border-radius: 0.25rem;
}

.gk-form-notice--error {
	color: var(--color-error-ink);
	background: var(--color-error-soft);
	border-color: var(--color-action);
}

@media (max-width: 680px) {
	.gk-form-grid {
		grid-template-columns: 1fr;
	}

	.gk-form {
		padding: 1.1rem;
		border-radius: 0.75rem;
	}

	.gk-form-submit button {
		width: 100%;
	}
}
