.icfp-form {
	max-width: 40rem;
	width: 100%;
	display: grid;
	gap: 0.85rem;
	box-sizing: border-box;
	margin-inline: auto;
	text-align: start;
	-webkit-text-size-adjust: 100%;
}

.icfp-form *,
.icfp-form *::before,
.icfp-form *::after {
	box-sizing: border-box;
}

.icfp-form--search {
	max-width: none;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	align-items: end;
	margin-bottom: 2rem;
}

.icfp-form__field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.icfp-form__field label {
	font-weight: 600;
}

.icfp-form input[type="text"],
.icfp-form input[type="email"],
.icfp-form input[type="password"],
.icfp-form input[type="search"],
.icfp-form input[type="url"],
.icfp-form input[type="file"],
.icfp-form textarea,
.icfp-form select {
	width: 100%;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
}

.icfp-form textarea {
	min-height: 7rem;
}

.icfp-tags {
	position: relative;
	width: 100%;
}

.icfp-tags__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.45rem;
}

.icfp-tags__chips:empty {
	display: none;
}

.icfp-tags__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	max-width: 100%;
	padding: 0.25rem 0.35rem 0.25rem 0.6rem;
	border-radius: 999px;
	background: #1d2327;
	color: #fff;
	font-size: 0.9rem;
	line-height: 1.2;
}

.icfp-tags__remove {
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	line-height: 1;
	padding: 0.25rem 0.4rem;
	min-width: 2rem;
	min-height: 2rem;
}

.icfp-tags__search {
	width: 100%;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	font: inherit;
	font-size: 16px;
}

.icfp-tags__suggestions {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	margin: 0.2rem 0 0;
	padding: 0.25rem 0;
	list-style: none;
	max-height: 16rem;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.icfp-tags__option {
	padding: 0.65rem 0.75rem;
	min-height: 2.75rem;
	cursor: pointer;
}

.icfp-tags__option.is-active,
.icfp-tags__option:hover {
	background: #f0f0f1;
}

.icfp-tags--ready .icfp-tags__values {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.icfp-tags__fallback {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
	padding: 0.35rem 0;
	margin: 0;
}

.icfp-form__help {
	font-size: 0.9em;
	opacity: 0.85;
}

.icfp-form__actions {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.icfp-form--search .icfp-form__actions {
	grid-column: 1 / -1;
}

.icfp-form__submit {
	padding: 0.75rem 1.1rem;
	min-height: 2.75rem;
	border: 0;
	border-radius: 4px;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 16px;
}

.icfp-form__submit:hover,
.icfp-form__submit:focus {
	background: #2c3338;
}

.icfp-form__reset {
	font-size: 0.95em;
	padding: 0.5rem 0;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
}

.icfp-form__notices {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	grid-column: 1 / -1;
}

.icfp-form__notices ul {
	margin: 0;
	padding-left: 1.2rem;
}

.icfp-form__notices--error {
	background: #f8d7da;
	color: #721c24;
}

.icfp-form__notices--success {
	background: #d4edda;
	color: #155724;
}

.icfp-form__preview img {
	max-width: 8rem;
	height: auto;
	border-radius: 4px;
	display: block;
}

.icfp-req {
	color: #b32d2e;
}

.icfp-profile__links {
	margin-bottom: 1rem;
}

.icfp-form__status a {
	text-decoration: underline;
}

.icfp-login {
	display: flex;
	justify-content: center;
	width: 100%;
}

.icfp-login .icfp-form,
.icfp-login .icfp-form__status {
	width: 100%;
	max-width: 28rem;
	margin-inline: auto;
	text-align: start;
}

.icfp-form--login .icfp-form__actions {
	justify-content: stretch;
}

.icfp-account-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 0.35rem;
}

.icfp-account-nav__link {
	text-decoration: underline;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0;
}

.icfp-invite-noscript {
	display: none;
}

.icfp-register--locked > .icfp-form {
	display: none;
}

body.icfp-invite-open {
	overflow: hidden;
}

.icfp-invite-gate {
	position: relative;
	display: flex;
	justify-content: center;
	margin: 0 auto 2rem;
	max-width: 28rem;
	width: 100%;
}

.icfp-register--locked .icfp-invite-gate {
	position: fixed;
	inset: 0;
	z-index: 100000;
	max-width: none;
	margin: 0;
	align-items: flex-start;
	justify-content: center;
	padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: rgba(15, 23, 42, 0.55);
}

.icfp-invite-gate[hidden] {
	display: none;
}

.icfp-invite-gate__card {
	width: 100%;
	max-width: 28rem;
	margin: auto;
	padding: 1.5rem 1.15rem;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

.icfp-invite-gate__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.icfp-invite-gate__text {
	margin: 0 0 1.25rem;
	opacity: 0.85;
}

.icfp-invite-gate__error {
	margin: 0;
	color: #721c24;
	background: #f8d7da;
	padding: 0.6rem 0.75rem;
	border-radius: 4px;
}

.icfp-invite-gate .icfp-form__submit,
.icfp-form__actions .icfp-form__submit {
	width: auto;
}

.icfp-form--login .icfp-form__actions .icfp-form__submit {
	width: 100%;
}

@media (max-width: 640px) {
	.icfp-form {
		max-width: 100%;
		gap: 1rem;
	}

	.icfp-form--search {
		grid-template-columns: 1fr;
	}

	.icfp-form--search .icfp-form__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.icfp-form__submit,
	.icfp-invite-gate .icfp-form__submit {
		width: 100%;
	}

	.icfp-invite-gate__card {
		margin-top: 12vh;
	}
}
