.tef {
	--tef-ink: #111111;
	--tef-paper: #ffffff;
	--tef-muted: #4a4a4a;
	--tef-radius: 16px;
	--tef-gap: 1rem;
	--tef-border: 1px solid var(--tef-ink);
	box-sizing: border-box;
	color: var(--tef-ink);
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.45;
	max-width: 40rem;
	width: 100%;
}

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

.tef input,
.tef textarea,
.tef button,
.tef select {
	font-family: inherit;
}

.tef-honeypot {
	position: absolute !important;
	left: -9999px !important;
	height: 0 !important;
	width: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.tef-form {
	display: block;
}

.tef-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--tef-gap);
}

.tef-field {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-height: 4.25rem;
	padding: 0.7rem 1rem 0.55rem;
	border: var(--tef-border);
	border-radius: var(--tef-radius);
	background: var(--tef-paper);
	cursor: text;
}

.tef-field--full {
	grid-column: 1 / -1;
}

.tef-field--message {
	min-height: 12.5rem;
}

.tef-field__label {
	display: block;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	line-height: 1.3;
	margin-bottom: 0.15rem;
}

.tef-field__input {
	display: block;
	width: 100%;
	flex: 1;
	margin: 0;
	padding: 0.15rem 0 0.2rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.05rem;
	line-height: 1.4;
	outline: none;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	border-radius: 0;
}

.tef-field--message .tef-field__input {
	min-height: 8.5rem;
	resize: vertical;
}

.tef-field__input::placeholder {
	color: #8a8a8a;
	font-style: italic;
	font-size: 0.92rem;
}

.tef-field:focus-within {
	outline: 1px solid var(--tef-ink);
	outline-offset: 1px;
}

.tef-field.is-error {
	outline: 1px solid #9b1c1c;
	outline-offset: 1px;
}

.tef-section {
	margin-top: 1.5rem;
}

.tef-section__title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 400;
	letter-spacing: 0.01em;
}

.tef-section__help,
.tef-note {
	margin: 0 0 0.85rem;
	color: var(--tef-muted);
	font-size: 0.95rem;
}

.tef-note {
	margin: 1.5rem 0 1rem;
}

.tef-upload {
	position: relative;
}

.tef-upload__drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-height: 6.5rem;
	padding: 1rem 1.1rem;
	border: var(--tef-border);
	border-radius: var(--tef-radius);
	background: var(--tef-paper);
}

.tef-upload__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.tef-upload.is-drag .tef-upload__drop {
	background: #f6f6f6;
}

.tef-upload__label {
	font-size: 0.95rem;
}

.tef-upload__hint {
	margin-top: 0.25rem;
	color: var(--tef-muted);
	font-size: 0.85rem;
}

.tef-upload__list {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
	position: relative;
	z-index: 3;
}

.tef-upload__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid #e5e5e5;
	font-size: 0.92rem;
}

.tef-upload__item button {
	appearance: none;
	background: none;
	border: 0;
	color: var(--tef-ink);
	cursor: pointer;
	font: inherit;
	font-size: 0.85rem;
	text-decoration: underline;
	padding: 0;
}

.tef-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.tef-chip {
	display: inline-flex;
	align-items: center;
	margin: 0;
	cursor: pointer;
}

.tef-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tef-chip span {
	display: inline-block;
	padding: 0.55rem 1.05rem;
	border: var(--tef-border);
	border-radius: 999px;
	background: var(--tef-paper);
	font-size: 0.95rem;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease;
}

.tef-chip:hover span,
.tef-chip:focus-within span {
	background: #f4f4f4;
}

.tef-chip input:checked + span {
	background: var(--tef-ink);
	color: var(--tef-paper);
}

.tef-chip input:focus-visible + span {
	outline: 1px solid var(--tef-ink);
	outline-offset: 2px;
}

.tef-other {
	margin-top: var(--tef-gap);
}

.tef-other[hidden] {
	display: none;
}

.tef-alert {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid #9b1c1c;
	border-radius: var(--tef-radius);
	color: #9b1c1c;
	font-size: 0.95rem;
}

.tef-alert[hidden] {
	display: none;
}

.tef-actions {
	display: flex;
	justify-content: flex-end;
}

.tef-submit {
	appearance: none;
	min-width: calc(50% - (var(--tef-gap) / 2));
	padding: 0.7rem 1.5rem;
	border: var(--tef-border);
	border-radius: var(--tef-radius);
	background: var(--tef-paper);
	color: var(--tef-ink);
	cursor: pointer;
	font: inherit;
	font-size: 1.05rem;
	letter-spacing: 0.01em;
	line-height: 1.2;
}

.tef-submit:hover,
.tef-submit:focus-visible {
	background: var(--tef-ink);
	color: var(--tef-paper);
}

.tef-submit:disabled {
	opacity: 0.55;
	cursor: wait;
}

.tef-success {
	padding: 1.5rem 0;
}

.tef-success[hidden] {
	display: none;
}

.tef-success__title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 400;
}

.tef-success__body {
	margin: 0;
	font-size: 1.05rem;
}

@media (max-width: 640px) {
	.tef-grid {
		grid-template-columns: 1fr;
	}

	.tef-submit {
		width: 100%;
		min-width: 0;
	}
}
