:root {
  color-scheme: light;
  --page-bg: #f4f1eb;
  --surface: #ffffff;
  --surface-muted: #f8f7f4;
  --text: #243127;
  --text-muted: #5f6f62;
  --border: #d8ded6;
  --shadow: 0 24px 70px rgba(36, 49, 39, 0.12);
  --primary: #1f5c45;
  --primary-dark: #174735;
  --accent: #c7a15a;
  --accent-soft: rgba(199, 161, 90, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(199, 161, 90, 0.18), transparent 26%),
    linear-gradient(180deg, #fcfbf8 0%, var(--page-bg) 100%);
  color: var(--text);
}

.page-shell {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.hero-card,
.step {
  background: var(--surface);
  border: 1px solid rgba(31, 92, 69, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
  margin-bottom: 24px;
  background:
    linear-gradient(135deg, rgba(31, 92, 69, 0.98), rgba(23, 71, 53, 0.92)),
    var(--surface);
  color: #fff;
}

.eyebrow,
.step-number {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-card .eyebrow {
  color: #f4dcc0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.hero-copy,
.step-copy {
  margin: 14px 0 0;
  line-height: 1.6;
}

.hero-copy {
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.84);
}

.step {
  padding: 28px;
}

.step-header {
  margin-bottom: 24px;
}

.step-number {
  color: var(--accent);
}

.step-copy {
  color: var(--text-muted);
}

.wizard-form {
  display: grid;
  gap: 18px;
}

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

.field-label {
  font-weight: 700;
  color: var(--text);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 92, 69, 0.14);
  background: #fff;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 92, 69, 0.24);
}

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

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.summary-label {
  font-weight: 700;
}

.summary-value {
  color: var(--text-muted);
  text-align: right;
}

.loan-down-payment-group {
  display: grid;
  gap: 18px;
}

.checkbox-field {
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
}

.legal-link {
  color: var(--primary);
  font-size: 0.92rem;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(36, 49, 39, 0.6);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay:target {
  display: flex;
}

.modal-card {
  width: min(100%, 560px);
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.modal-card h3 {
  margin: 0;
}

.modal-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.success-step {
  border-color: rgba(31, 92, 69, 0.18);
}

@media (max-width: 640px) {
  .page-shell {
    padding: 24px 16px 40px;
  }

  .hero-card,
  .step {
    padding: 22px;
    border-radius: 20px;
  }

  .summary-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-value {
    text-align: left;
  }
}
