:root {
  --ink: #1a1f26;
  --ink-muted: #545c66;
  --paper: #ffffff;
  --bg: #f4f5f7;
  --line: #d7dbe0;
  --accent: #1f5a8a;
  --accent-dark: #123c5c;
  --danger: #9c2a2a;
  --danger-bg: #fbeaea;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 12px;
}

.lede {
  color: var(--ink-muted);
  margin: 0 0 24px;
}

/* --- WIZARD STEPS & INDICATOR --- */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.step-dot.active {
  background: var(--accent);
}

/* --- FIELDSETS & OPTIONS --- */
fieldset.mode-choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 24px;
  background: var(--paper);
}

fieldset.mode-choice legend {
  font-weight: 600;
  padding: 0 6px;
}

.mode-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 4px;
  cursor: pointer;
}

.mode-option:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.mode-option input {
  margin-top: 5px;
}



.mode-option p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* --- FORMS & INPUTS --- */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Only make top-level direct field label spans block/bold, not inline text inside paragraphs */
.field > label,
.field > .field-label {
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="email"],
select,
textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 160px;
}

small {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

#zone-field{
  margin-top: 15px;
}

/* --- FILE DROP ZONE & FILE QUEUE --- */
.file-drop-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop-zone:hover {
  border-color: var(--accent);
  background: #f9fbfd;
}

.file-drop-zone p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

#file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.file-item button {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 8px;
}

.file-item button:hover {
  text-decoration: underline;
}

/* --- SUMMARY CARD (STEP 4) --- */
#summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

#summary-card p {
  margin: 8px 0;
  font-size: 0.95rem;
}

/* --- BUTTONS & NAVIGATION --- */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

button {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 20px;
  cursor: pointer;
  border: none;
}

button[type="submit"],
#next-btn {
  background: var(--accent);
  color: white;
  margin-left: auto; /* Push to right if alone */
}

button[type="submit"]:hover,
#next-btn:hover {
  background: var(--accent-dark);
}

#prev-btn {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

#prev-btn:hover {
  background: var(--bg);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- ERRORS & PROGRESS --- */
.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* Fixes the spinner and upload progress wrapping */
#progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

#progress-wrap p {
  margin: 0;
}

progress {
  width: 100%;
  height: 10px;
}

.spinner {
  border: 3px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#success-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

[hidden] {
  display: none !important;
}