:root {
  --bg: #f5f7f1;
  --surface: #ffffff;
  --surface-2: #f9fbf5;
  --text: #172016;
  --muted: #687264;
  --line: #dfe6d8;
  --green: #104c2f;
  --green-2: #176a43;
  --yellow: #f2c230;
  --yellow-soft: #fff4c8;
  --red: #b42318;
  --blue: #175cd3;
  --shadow: 0 18px 45px rgba(20, 38, 20, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 194, 48, .22), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(16, 76, 47, .14), transparent 30rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: .9fr 1.35fr;
  gap: 24px;
  align-items: start;
}

.hero-card, .app-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(223, 230, 216, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card {
  padding: 28px;
  position: sticky;
  top: 24px;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: .25;
}

.brand-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 34px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--yellow);
  font-weight: 900;
  font-size: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
  color: var(--green-2);
}

h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.05em; }
h2 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.04em; }
h3 { font-size: 22px; letter-spacing: -0.03em; }

.hero-text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 24px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pills span {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.app-card { padding: 26px; }

.step-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.progress {
  display: flex;
  gap: 8px;
}

.progress span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2e9;
  color: var(--muted);
  font-weight: 900;
  border: 1px solid var(--line);
}

.progress span.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.progress span.is-done {
  background: var(--yellow-soft);
  color: var(--green);
  border-color: var(--yellow);
}

.status-box {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  background: #edf5ff;
  color: var(--blue);
  border: 1px solid #cfe3ff;
}

.status-box.success { background: #ecfdf3; border-color: #c6f6d5; color: #067647; }
.status-box.error { background: #fff1f0; border-color: #ffd1ce; color: var(--red); }

.step-panel { display: none; padding-top: 24px; }
.step-panel.is-active { display: block; animation: fadeIn .18s ease-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.form-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1.5fr .65fr 1fr; }
.field.wide { grid-column: span 1; }

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

.field span {
  font-size: 14px;
  font-weight: 900;
}

.field small {
  color: var(--muted);
  font-size: 12px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border .16s ease, box-shadow .16s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(23, 106, 67, .12);
}

.big-field input { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }

.phone-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding-left: 13px;
}

.phone-wrap:focus-within {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(23, 106, 67, .12);
}

.phone-wrap strong { color: var(--green); font-weight: 900; }
.phone-wrap input { border: 0; box-shadow: none !important; padding-left: 4px; }

.actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.actions.right { justify-content: flex-end; }
.actions.split { justify-content: space-between; }

.btn {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .58; cursor: wait; transform: none; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(16, 76, 47, .22); }
.btn.success { background: var(--yellow); color: #1b1b08; box-shadow: 0 10px 24px rgba(169, 128, 20, .18); }
.btn.ghost { background: #eef2e9; color: var(--green); }

.section-title { margin-bottom: 18px; }
.section-title p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.section-title.compact { margin-bottom: 14px; }

.customer-card, .manual-box, .preview-card, .review-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}

.is-hidden { display: none !important; }

.customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-line, .review-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.info-line span, .review-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.info-line strong, .review-row strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

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

.source-strip span {
  background: var(--yellow-soft);
  color: var(--green);
  border: 1px solid #f4dda1;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.link-button {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--green-2);
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.preview-card span { font-weight: 900; color: var(--muted); }
.preview-card strong {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 24px;
}
.preview-card small { color: var(--muted); }

.review-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toast-area {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 20;
}

.toast {
  opacity: 0;
  transform: translateY(8px);
  transition: .18s ease;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 13px 14px;
  font-weight: 900;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; }
  .hero-card { position: static; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 18px, 1180px); padding: 12px 0; }
  .hero-card, .app-card { padding: 18px; border-radius: 20px; }
  .step-header { align-items: flex-start; flex-direction: column; }
  .form-grid.two, .form-grid.three, .customer-grid, .review-box { grid-template-columns: 1fr; }
  .actions, .actions.split, .actions.right { flex-direction: column-reverse; }
  .btn { width: 100%; }
  .preview-card { align-items: flex-start; flex-direction: column; }
}
