.contact-field {
  border: 0;
  margin: 1.2rem 0 0;
  padding: 0;
}

.contact-field legend,
.field-label {
  display: block;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contact-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: .7rem;
}

.contact-options input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.contact-options label,
.file-trigger {
  align-items: center;
  border: 1px solid currentColor;
  cursor: pointer;
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 3.5rem;
  padding: .8rem 1rem;
}

.contact-options input:checked + label {
  background: currentColor;
}

[data-concept="dark"] .contact-options input:checked + label,
[data-concept="editorial"] .contact-options input:checked + label,
[data-concept="minimal"] .contact-options input:checked + label {
  background: #111;
  color: #fff;
}

[data-concept="dark"] .contact-options input:checked + label {
  background: #f2eee7;
  color: #0b0b0b;
}

.contact-options input:focus-visible + label,
input[type="file"]:focus-visible + .file-trigger,
[data-concept="minimal"] input:focus-visible,
[data-concept="minimal"] textarea:focus-visible,
[data-concept="minimal"] button:focus-visible,
[data-concept="minimal"] a:focus-visible {
  outline: 3px solid #111;
  outline-offset: 4px;
}

.form-status:focus {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

[data-concept="dark"] .contact-options input:focus-visible + label,
[data-concept="dark"] input[type="file"]:focus-visible + .file-trigger {
  outline-color: #f2eee7;
}

.reference-field {
  margin-top: 1.2rem;
}

.field-label span {
  color: #666;
  letter-spacing: 0;
  text-transform: none;
}

.file-trigger {
  border-style: dashed;
  justify-content: flex-start;
  margin-top: .7rem;
}

.reference-field > small {
  display: block;
  margin-top: .65rem;
}

.reference-field > small[data-state="error"] {
  color: #a1261d;
  font-weight: 600;
}

.file-trigger[aria-disabled="true"] {
  cursor: default;
  opacity: .48;
}

.reference-preview {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .7rem;
}

.reference-preview:empty {
  display: none;
}

.reference-item {
  aspect-ratio: 1;
  background: #e4e4df;
  overflow: hidden;
  position: relative;
}

.reference-item img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.reference-fallback {
  align-items: center;
  display: none;
  font-size: .65rem;
  height: 100%;
  justify-content: center;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: .65rem;
  text-align: center;
  white-space: pre-line;
}

.reference-item.is-unavailable img {
  display: none;
}

.reference-item.is-unavailable .reference-fallback {
  display: flex;
}

.reference-remove {
  align-items: center;
  background: #111;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  height: 2rem;
  justify-content: center;
  letter-spacing: 0;
  margin: 0;
  min-height: 0;
  padding: 0;
  position: absolute;
  right: .4rem;
  top: .4rem;
  width: 2rem;
}

.reference-remove:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

input[type="file"]:not([hidden]) {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}
