.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  /* Without this, a text input's default intrinsic width can exceed a
     narrow grid/flex track (e.g. .contact-form__group--split on a small
     screen) and force the whole row to overflow its container instead of
     shrinking to fit. */
  min-width: 0;
}

.field__label {
  font-size: var(--font-size-3);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field__input,
.field__textarea {
  padding: var(--space-3) 0;
  font-family: var(--font-body);
  font-size: var(--font-size-5);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--duration-base) var(--ease-standard);
}

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--color-ink);
}

.field__textarea {
  resize: vertical;
  min-height: 6rem;
}

/* Native select arrows can't be restyled directly and vary too much across
   browsers/OSes to match the rest of the form's plain, line-only inputs, so
   the default arrow is suppressed in favour of a custom one. The chevron's
   color is a literal hex (matching --color-ink-soft), not the var itself —
   custom properties can't be referenced inside an inline SVG data URI. */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: var(--space-3) var(--space-6) var(--space-3) 0;
  font-family: var(--font-body);
  font-size: var(--font-size-5);
  color: var(--color-text);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a4842' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 11px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard);
}

.field__select:focus {
  outline: none;
  border-color: var(--color-ink);
}

.field__error {
  font-size: var(--font-size-2);
  color: #a8402f;
}
