:root {
  color-scheme: dark;
  --font-family: "Lexend", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #08192d;
  --panel: #0d223c;
  --panel-strong: #102a49;
  --text: #ffffff;
  --muted: #c7d5e4;
  --line: rgba(255, 255, 255, 0.28);
  --line-strong: rgba(255, 255, 255, 0.58);
  --accent: #0cd2b4;
  --accent-strong: #31e5cb;
  --danger: #ffb4a8;
  --input: #08192d;
  --shadow: rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(12, 210, 180, 0.08), transparent 34%),
    var(--background);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 14px;
}

button,
input {
  font: inherit;
}

a {
  color: var(--accent);
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 14px 16px;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 34, 60, 0.92);
  box-shadow: 0 22px 60px var(--shadow);
  overflow: hidden;
}

.form-header {
  padding: 20px 28px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.progress-item {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-dot {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.progress-item.is-active,
.progress-item.is-done {
  color: var(--text);
}

.progress-item.is-active .progress-dot,
.progress-item.is-done .progress-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--background);
}

.progress-item.is-active .progress-dot {
  transform: scale(1.08);
}

.step-content {
  display: grid;
  gap: 14px;
  padding: 18px 28px 6px;
  will-change: opacity, transform;
}

.step-content.is-entering {
  animation: step-enter-forward 220ms ease-out both;
}

.step-content[data-direction="back"].is-entering {
  animation-name: step-enter-back;
}

.step-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.info {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.info p {
  margin: 0;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.legend {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.legend {
  display: block;
  margin: 0 0 8px;
  padding: 0;
}

.required {
  color: var(--accent);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.text-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 210, 180, 0.18);
}

.dropzone {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: rgba(8, 25, 45, 0.72);
  padding: 12px;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent);
  background: rgba(12, 210, 180, 0.12);
}

.dropzone:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 210, 180, 0.18);
  outline: none;
}

.dropzone.is-dragging {
  transform: translateY(-1px);
}

.dropzone-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(12, 210, 180, 0.15);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
}

.dropzone-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dropzone-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
}

.dropzone-detail {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

.file-list {
  display: grid;
  gap: 6px;
}

.file-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.file-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.file-remove {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

.file-remove:hover,
.file-remove:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}

.radio-group {
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
}

.radio-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  column-gap: 12px;
  row-gap: 10px;
}

.radio-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.radio-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.radio-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input);
  padding: 10px 12px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.radio-marker {
  align-self: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.radio-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.radio-label {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

.radio-detail {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.radio-option input:focus-visible + .radio-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 210, 180, 0.18);
}

.radio-option input:checked + .radio-card {
  border-color: var(--accent);
  background: rgba(12, 210, 180, 0.15);
}

.radio-option input:checked + .radio-card .radio-marker {
  border-color: var(--accent);
  background:
    radial-gradient(circle at center, var(--background) 0 5px, transparent 5.5px),
    var(--accent);
}

.checkbox-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input);
  padding: 12px;
  cursor: pointer;
}

.checkbox-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.checkbox-box {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-box::after {
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--background);
  border-left: 2px solid var(--background);
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.checkbox-text {
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-option:has(input:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 210, 180, 0.18);
}

.checkbox-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(12, 210, 180, 0.15);
}

.checkbox-option input:checked + .checkbox-box {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-option input:checked + .checkbox-box::after {
  opacity: 1;
}

.review {
  display: grid;
  gap: 8px;
  margin: 0;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) 1fr;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.review dt {
  color: var(--muted);
  font-weight: 700;
}

.review dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.form-error {
  min-height: 18px;
  margin: 8px 28px 0;
  color: var(--danger);
  font-weight: 700;
}

.form-error:empty {
  display: none;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 28px 18px;
}

.actions:has(.button-secondary:not([hidden])) {
  justify-content: space-between;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.button:focus-visible {
  outline: 3px solid rgba(12, 210, 180, 0.24);
  outline-offset: 2px;
}

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

.button-primary {
  background: var(--accent);
  color: var(--background);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button[hidden] {
  display: none;
}

.button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.success {
  display: grid;
  gap: 10px;
  padding: 24px 28px 26px;
  animation: step-enter-forward 220ms ease-out both;
}

.success h2 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 0;
}

.success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.success-copy {
  display: grid;
  gap: 6px;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 14px;
  }

  .form-header,
  .step-content,
  .actions,
  .success {
    padding-left: 18px;
    padding-right: 18px;
  }

  .form-error {
    margin-left: 18px;
    margin-right: 18px;
  }

  .progress {
    gap: 8px;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .dropzone {
    grid-template-columns: 36px 1fr;
    min-height: 88px;
    padding: 14px;
  }

  .dropzone-icon {
    width: 36px;
    height: 36px;
  }

  .file-item {
    grid-template-columns: 1fr;
  }

  .file-remove {
    width: 100%;
  }

  .radio-group {
    display: block;
  }

  .radio-options {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

@keyframes step-enter-forward {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes step-enter-back {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
