:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #14213d;
  --muted: #445;
  --faint: #778;
  --accent: #d0382a;
  --accent-hover: #b52f24;
  --ok: #1b7f4a;
  --err: #b42318;
  --font: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(208, 56, 42, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(20, 33, 61, 0.06), transparent 45%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 1rem;
}

.brand {
  width: 100%;
  max-width: 420px;
  padding: 0 0.5rem;
  background: transparent;
}

.brand img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
}

main {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.1);
  min-width: 0;
}

h1 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
  text-align: center;
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
  text-align: center;
}

.meta {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.meta strong { font-weight: 600; }

.finance-terms {
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.35rem;
}

.finance-terms .meta {
  margin: 0;
}

.status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--faint);
  text-align: center;
}

.status:empty {
  display: none;
  min-height: 0;
  margin: 0;
}

.actions {
  margin-top: 1.5rem;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border: none;
  border-radius: 28px;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled,
.btn.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.foot {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--faint);
  line-height: 1.45;
  text-align: center;
}

.ok h1 { color: var(--ok); }
.err h1 { color: var(--err); }

.spin {
  width: 36px;
  height: 36px;
  border: 3px solid #f0e6da;
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

.center { text-align: center; }

a.retry {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
}

.progress-wrap {
  margin: 1.5rem 0 0.5rem;
}

.progress-track {
  height: 12px;
  background: #f0e6da;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d0382a, #e25548);
  border-radius: 999px;
}

.progress-label {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.consent {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.consent-q {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid #e6ddd0;
  border-radius: 10px;
  background: #faf8f4;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.consent-label {
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.consent-choices {
  display: flex;
  gap: 0.5rem;
}

.consent-choices.stacked {
  flex-direction: column;
}

.choice {
  flex: 1;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8cfc0;
  border-radius: 8px;
  cursor: pointer;
}

.choice:hover:not(:disabled):not(.is-selected) {
  border-color: var(--accent);
  color: var(--accent);
}

.choice.is-selected,
.choice.is-selected:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.choice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.consent-q.is-disabled {
  opacity: 0.7;
}

.dob-gate {
  margin-top: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e6ddd0;
}

.dob-lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.dob-fields {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.dob-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 0 0 3.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--faint);
  text-align: center;
}

.dob-field.dob-year {
  flex-basis: 4.75rem;
}

.dob-field input {
  width: 100%;
  padding: 0.7rem 0.35rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  border: 1px solid #d8cfc0;
  border-radius: 8px;
  background: #fff;
}

.dob-field input:focus {
  outline: 2px solid rgba(208, 56, 42, 0.35);
  border-color: var(--accent);
}

.dob-error {
  color: var(--err);
  min-height: 1.2em;
}

button.btn {
  font: inherit;
}

.legal {
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 0 0.25rem;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--faint);
  text-align: center;
}
