:root {
  --ink: #1f2e28;
  --muted: #66756e;
  --line: #dfe5dd;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --wash: #f2f5ef;
  --forest: #385343;
  --deep: #14231c;
  --gold: #b9914b;
  --rose: #b56b63;
  --shadow: 0 16px 44px rgba(28, 42, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

.form-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.form-topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  background: rgba(242, 245, 239, 0.96);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.form-actions,
.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary,
.ghost,
.quiet {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 6px;
  font-weight: 760;
  text-decoration: none;
}

.primary {
  border: 0;
  color: white;
  background: var(--forest);
}

.ghost,
.quiet {
  color: var(--forest);
  border: 1px solid var(--line);
  background: white;
}

.quiet {
  color: var(--muted);
}

.form-hero {
  padding: 24px 0 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0;
}

.form-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(28, 42, 35, 0.03);
}

.form-step {
  display: none;
  padding: clamp(18px, 4vw, 28px);
}

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

.step-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.step-head h2 {
  margin-bottom: 5px;
  font-size: 1.25rem;
}

.step-head p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.step-pill {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--forest);
  background: #edf3ea;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.field-grid.single {
  grid-template-columns: 1fr;
}

.field-grid label,
.repeatable label,
.check-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.other-field[hidden],
[hidden] {
  display: none !important;
}

.inline-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-checks label {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: white;
  font-size: 0.9rem;
}

.inline-checks input,
.check-row input[type="checkbox"] {
  width: auto;
  min-height: 0;
  accent-color: var(--forest);
}

.repeatable {
  display: grid;
  gap: 10px;
}

.repeatable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.repeatable-row button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #8b4e45;
  background: #faecea;
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fbfcf9;
}

.status {
  color: var(--muted);
  font-size: 0.9rem;
}

.success {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #bad3bf;
  border-radius: 8px;
  color: var(--forest);
  background: #eef7ee;
}

@media (max-width: 720px) {
  .form-shell {
    width: min(100% - 18px, 980px);
    padding-top: 8px;
  }

  .form-topbar,
  .step-head,
  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions,
  .step-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .field-grid,
  .repeatable-row {
    grid-template-columns: 1fr;
  }

  .form-step {
    padding: 16px;
  }
}
