/* ============================================================
   Layout — topbar, progress, content wrap, footer & buttons
   ============================================================ */

/* Topbar */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  visibility: hidden;
}
.back-btn.show { visibility: visible; }
.back-btn:hover { color: var(--fg); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  cursor: pointer;
  user-select: none;
}
.logo-icon {
  display: inline-flex;
  color: var(--accent);
}
.logo-icon svg { display: block; }
.logo-text span { color: var(--accent); }

.topbar-spacer { width: 64px; }

/* Progress */
.progress {
  flex-shrink: 0;
  height: 4px;
  background: var(--line);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand);
  transition: width .35s ease;
}

/* Layout — the scrollable content zone between topbar and footer */
.wrap {
  flex: 1 1 auto;
  min-height: 0;             /* allow it to shrink and scroll inside the flex column */
  overflow-y: auto;
  padding: 40px 24px;
}

/* Centres a short step, but lets a tall one grow so .wrap scrolls (no flex clipping) */
form {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step { display: none; animation: fade .35s ease; }
.step.is-active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer / buttons */
.footer {
  flex-shrink: 0;
  padding: 20px 24px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.btn {
  width: 100%;
  font-size: 19px;
  font-weight: 700;
  padding: 19px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .05s ease, opacity .15s ease;
}
.btn:active { transform: scale(.99); }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }

.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); }

.trust {
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  margin: 0;
}
.trust-icon {
  display: inline-flex;
  vertical-align: -3px;
  color: white;
}
.trust-icon svg { display: block; }
