:root {
  /* Based on onboarding-biometrics light theme tokens */
  --neutral-10: #fcfeff;
  --neutral-20: #f9fbfc;
  --neutral-30: #f6f8fa;
  --neutral-40: #edeff2;
  --neutral-50: #e1e3e5;
  --neutral-60: #c5c8cc;
  --neutral-80: #6d7075;
  --neutral-90: #3b3f42;
  --neutral-100: #1f2224;
  --primary-30: #a7cbfe;
  --primary-60: #438ef8;
  --primary-70: #2479f0;
  --primary-80: #1064db;
  --danger-70: #cf1332;
  --success-60: #20bf7d;
  --warning-70: #b06a00;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--neutral-100);
  background:
    radial-gradient(circle at 15% -10%, color-mix(in srgb, var(--primary-60) 24%, white), transparent 48%),
    radial-gradient(circle at 95% 10%, color-mix(in srgb, var(--primary-30) 42%, white), transparent 52%),
    linear-gradient(180deg, var(--neutral-20) 0%, var(--neutral-10) 42%, #ffffff 100%);
}

.bg-ornament {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(64px);
  z-index: 0;
}

.bg-ornament-top {
  width: 420px;
  height: 420px;
  top: -220px;
  right: -120px;
  background: color-mix(in srgb, var(--primary-60) 26%, white);
}

.bg-ornament-bottom {
  width: 360px;
  height: 360px;
  left: -80px;
  bottom: -180px;
  background: color-mix(in srgb, var(--primary-30) 46%, white);
}

.page {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem 3rem;
}

.shell {
  width: min(900px, 100%);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--neutral-50);
  border-radius: 20px;
  box-shadow:
    0 12px 32px rgba(31, 34, 36, 0.08),
    0 2px 10px rgba(31, 34, 36, 0.06);
  backdrop-filter: blur(6px);
  padding: 1.25rem;
}

.form-header {
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--primary-60) 28%, white);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-30) 32%, white) 0%,
    color-mix(in srgb, var(--primary-60) 8%, white) 100%
  );
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-80);
}

h1 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.2;
}

.description {
  margin: 0;
  color: var(--neutral-90);
  font-size: 0.95rem;
}

.required-star {
  color: var(--danger-70);
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.field-card {
  background: #fff;
  border: 1px solid var(--neutral-50);
  border-radius: 14px;
  padding: 0.95rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field-card:focus-within {
  border-color: color-mix(in srgb, var(--primary-60) 52%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-30) 35%, white);
}

label {
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.42rem;
}

.field-section-title {
  margin: 0 0 0.66rem;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
}

.helper {
  margin: 0 0 0.66rem;
  color: var(--neutral-80);
  font-size: 0.83rem;
  line-height: 1.35;
}

input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  border: 1px solid var(--neutral-60);
  border-radius: 10px;
  font: inherit;
  color: var(--neutral-100);
  background: #fff;
}

input[type='text'],
input[type='email'],
textarea {
  padding: 0.7rem 0.78rem;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--neutral-80) 78%, white);
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-70);
}

.same-email-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.72rem 0 0.86rem;
}

.same-email-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary-70);
  flex: 0 0 auto;
}

.same-email-label {
  display: inline;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-90);
  cursor: pointer;
}

.same-email-checkbox:disabled + .same-email-label {
  cursor: default;
  opacity: 0.62;
}

input[type='email'].mirrored-email {
  background: color-mix(in srgb, var(--primary-30) 18%, white);
  border-color: color-mix(in srgb, var(--primary-60) 40%, white);
}

.file-input-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.upload-zone {
  border: 1px dashed color-mix(in srgb, var(--primary-60) 55%, white);
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-30) 26%, white), transparent 50%),
    #fff;
  min-height: 132px;
  padding: 0.8rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.upload-zone:hover {
  border-color: color-mix(in srgb, var(--primary-60) 75%, white);
}

.upload-zone:focus-visible {
  outline: none;
  border-color: var(--primary-70);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-30) 40%, white);
}

.upload-zone.dragover {
  border-color: var(--primary-70);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-30) 38%, white), transparent 50%),
    #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-30) 40%, white);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success-60) 60%, white);
  background: color-mix(in srgb, var(--success-60) 8%, white);
}

.upload-copy {
  display: grid;
  gap: 0.24rem;
  flex: 1;
  min-width: 0;
}

.upload-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neutral-100);
}

.upload-subtitle {
  margin: 0;
  font-size: 0.79rem;
  color: var(--neutral-80);
}

.upload-preview {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--neutral-60) 50%, white);
  background: #fff;
}

.upload-preview.splash {
  width: min(100%, 300px);
  height: 84px;
}

.upload-preview-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px 16px 16px auto;
  flex-shrink: 0;
}

.upload-preview-wrap[hidden] {
  display: none;
}

.upload-preview-remove {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: var(--danger-70);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--danger-70) 35%, transparent);
}

.upload-preview-remove:hover {
  filter: brightness(0.95);
}

.file-meta {
  display: grid;
  gap: 0.22rem;
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--neutral-80);
  min-height: 1.05rem;
}

.file-meta:empty {
  display: none;
}

.file-meta.success {
  color: var(--success-60);
}

.file-meta.error {
  color: var(--danger-70);
}

.file-meta.warning {
  color: var(--warning-70);
}

.file-meta-line {
  display: block;
}

.file-meta-line.success {
  color: var(--success-60);
}

.file-meta-line.error {
  color: var(--danger-70);
}

.file-meta-line.warning {
  color: var(--warning-70);
}

.key-features-list {
  display: grid;
  gap: 0.55rem;
}

.key-feature-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.key-feature-input {
  flex: 1;
}

.key-feature-remove {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--neutral-60);
  border-radius: 999px;
  background: #fff;
  color: var(--neutral-90);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.key-feature-remove:hover {
  border-color: var(--danger-70);
  color: var(--danger-70);
}

.key-feature-remove[hidden] {
  display: none;
}

.field-meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  min-height: 1.05rem;
  color: var(--neutral-80);
}

.field-meta.error {
  color: var(--danger-70);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.7rem 1rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-80), var(--primary-60));
  box-shadow: 0 8px 16px color-mix(in srgb, var(--primary-60) 30%, transparent);
}

.btn-secondary {
  color: var(--neutral-100);
  background: #fff;
  border: 1px solid var(--neutral-60);
}

.btn-ghost {
  color: var(--primary-80);
  background: color-mix(in srgb, var(--primary-30) 24%, white);
  border: 1px solid color-mix(in srgb, var(--primary-60) 34%, white);
  padding-inline: 0.85rem;
}

.payload-panel {
  margin-top: 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--neutral-50);
  background: var(--neutral-20);
  padding: 0.85rem;
}

.payload-header {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

h2 {
  margin: 0;
  font-size: 1rem;
}

.payload-note {
  margin: 0.42rem 0 0.66rem;
  font-size: 0.83rem;
  color: var(--neutral-80);
}

pre {
  margin: 0;
  background: #fff;
  border: 1px solid var(--neutral-50);
  border-radius: 10px;
  padding: 0.75rem;
  max-height: 340px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--neutral-100);
}

@media (max-width: 680px) {
  .shell {
    border-radius: 16px;
    padding: 0.85rem;
  }

  .form-header,
  .field-card {
    border-radius: 12px;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }

  .payload-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
