.form-success {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  padding: 72px 48px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.form-success .success-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 24px;
}
.form-success h4 {
  font-size: 26px;
  line-height: 32px;
  font-weight: 300;
  letter-spacing: -0.4px;
  color: var(--fg-primary);
  margin: 0 0 12px;
}
.form-success p {
  font-size: 15px;
  line-height: 24px;
  color: var(--fg-secondary);
  margin: 0 auto;
  max-width: 36ch;
  font-weight: 300;
}

.field {
  display: block;
  margin-bottom: 28px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin: 0 0 10px;
}
.field label .req {
  color: var(--accent);
}
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  font: 400 16px/24px var(--font-sans);
  color: var(--fg-primary);
  background: var(--bg-page);
  border: 1px solid var(--border-mid);
  padding: 14px 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background-color 0.15s;
}
.field textarea {
  min-height: 160px;
  resize: vertical;
  font-family: var(--font-sans);
}
.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-secondary) 50%),
    linear-gradient(-45deg, transparent 50%, var(--fg-secondary) 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field .help {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--fg-muted);
}
.field .error {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #d93b3b;
  display: none;
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #d93b3b;
}
.field.is-invalid .error {
  display: block;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field-grid .field {
  margin-bottom: 28px;
}

/* File upload */
.field-file {
  position: relative;
}
.field-file input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px dashed var(--border-mid);
  background: var(--bg-page);
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.field-file:hover .file-drop {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.field-file input[type="file"]:focus-visible + .file-drop {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  outline: none;
}
.file-drop-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  flex: 0 0 auto;
}
.file-drop-text {
  flex: 1 1 auto;
  min-width: 0;
}
.file-drop-primary {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--fg-primary);
  font-weight: 400;
}
.file-drop-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.file-drop-clear {
  appearance: none;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  cursor: pointer;
  padding: 6px 10px;
  flex: 0 0 auto;
  display: none;
  z-index: 2;
  position: relative;
}
.file-drop-clear:hover {
  color: var(--accent);
}
.field-file.has-file .file-drop {
  border-style: solid;
  border-color: var(--accent);
}
.field-file.has-file .file-drop-clear {
  display: inline-flex;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.form-foot .submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.form-foot .submit-btn:hover {
  background: var(--accent-hover);
}
.form-foot .privacy {
  font-size: 12px;
  line-height: 18px;
  color: var(--fg-muted);
  max-width: 36ch;
}
.form-foot .privacy a {
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}
.form-foot .privacy a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Form error banner (GTX-2809): inside the form, just above the submit row, in the field errors' red, so messages
   such as "your session has expired" or the per-address limit's "try again later" read as part of the form */
.form-error {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid rgba(217, 59, 59, 0.45);
  border-left: 3px solid #d93b3b;
  background: rgba(217, 59, 59, 0.08);
  color: var(--fg-primary);
  font-size: 14px;
  line-height: 21px;
}
.form-error[hidden] {
  display: none;
}
