:root {
  --ink: #435053;
  --muted: #707070;
  --line: #dce4ef;
  --brand: #D68F00;
  --brand-strong: #b77800;
  --progress: #1f7a4d;
  --progress-soft: #e8f5ee;
  --bg: #f5f7f4;
  --panel: #ffffff;
  --warn: #b3261e;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--muted);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 24px 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.site-logo {
  display: block;
  width: clamp(126px, 12vw, 168px);
  height: auto;
  flex: 0 0 auto;
}

.brand-title {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
.steps strong,
.note strong,
.field,
.choice-field,
.upload-field,
legend,
label,
p {
  margin-top: 0;
}

h1 {
  color: var(--ink);
  margin-bottom: 0;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.05;
}

h2,
h3,
.steps strong,
.note strong,
legend {
  color: var(--ink);
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.nav-link:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.progress-panel,
.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(23, 35, 63, 0.08);
}

.progress-panel {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 18px;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
}

.steps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-weight: 800;
}

.steps strong {
  font-size: 14px;
}

.steps li.is-active,
.steps li.is-complete {
  color: var(--ink);
  background: var(--progress-soft);
}

.steps li.is-active span,
.steps li.is-complete span {
  border-color: var(--progress);
  background: var(--progress);
  color: #fff;
}

.steps.steps-long {
  gap: 8px;
}

.steps.steps-long li {
  padding: 8px;
}

.steps.steps-long span {
  width: 30px;
  height: 30px;
}

.note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
}

.note strong {
  display: block;
  margin-bottom: 6px;
}

.note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.form-card {
  padding: clamp(22px, 4vw, 42px);
}

.form-head {
  margin-bottom: 28px;
}

.form-head p {
  margin-bottom: 10px;
  color: var(--progress);
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.bar span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--progress);
  transition: width 180ms ease;
}

.form-step {
  display: none;
}

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

.intro {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.intro h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 4vw, 34px);
}

.intro p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.choice-field,
.upload-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 800;
}

.label-text,
.legend-title {
  display: block;
  color: var(--ink);
  line-height: 1.22;
}

.required-mark {
  margin-left: 4px;
  color: var(--warn);
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(31, 122, 77, 0.18);
  border-color: var(--brand);
}

.choice-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.choice-field legend {
  float: left;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  font-weight: 800;
}

.choice-field legend + * {
  clear: both;
}

.choice-field label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.choice-field input,
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.choice-field small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.grid.three {
  align-items: end;
}

.grid.three .label-text {
  min-height: 2.45em;
  align-items: end;
}

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

.upload-field {
  min-height: 148px;
  justify-content: center;
  border: 1px dashed #9fb0c1;
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
}

.upload-field input {
  width: 100%;
}

.upload-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.helper-box,
.unit-row,
.quote-card {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.helper-box strong,
.unit-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.helper-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.helper-box.warn {
  border-color: #f2c9c5;
  background: #fff8f7;
}

.unit-list {
  display: grid;
  gap: 12px;
}

.unit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 14px;
}

.unit-row > strong {
  align-self: center;
  margin-bottom: 0;
}

.unit-row .field,
.unit-row .consent {
  margin-bottom: 0;
}

.consent.compact {
  align-items: center;
  min-height: 48px;
}

.quote-preview {
  display: grid;
  gap: 14px;
}

.quote-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.quote-line,
.quote-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
}

.quote-line span,
.quote-total span {
  color: var(--ink);
  font-weight: 800;
}

.quote-line strong {
  color: var(--muted);
}

.quote-line b,
.quote-total strong {
  color: var(--ink);
}

.quote-total {
  grid-template-columns: minmax(0, 1fr) auto;
}

.quote-total.final {
  border-bottom: 0;
  background: var(--progress-soft);
}

.quote-total.final strong {
  color: var(--progress);
  font-size: 20px;
}

.consent {
  margin: 10px 0 20px;
}

.consent a {
  color: var(--brand-strong);
  font-weight: 800;
}

.error-summary {
  min-height: 24px;
  margin: 8px 0 16px;
  color: var(--warn);
  font-weight: 800;
}

.summary-screen {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(23, 35, 63, 0.08);
  padding: clamp(22px, 4vw, 42px);
}

.summary-screen[hidden] {
  display: none;
}

.summary-screen h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 4vw, 38px);
}

.summary-screen > p {
  max-width: 780px;
  margin-bottom: 26px;
  line-height: 1.55;
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fbfcfd;
}

.summary-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.summary-item span {
  color: var(--muted);
  line-height: 1.45;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.summary-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--brand-strong);
}

button.secondary {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
}

button[hidden] {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  transform: translateY(120%);
  transition: transform 180ms ease;
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.toast.is-visible {
  transform: translateY(0);
}

.is-invalid {
  border-color: var(--warn) !important;
}

@media (max-width: 900px) {
  .topbar {
    display: grid;
    gap: 18px;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .brand-lockup {
    align-items: center;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    position: static;
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .steps li {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .grid.two,
  .grid.three,
  .upload-grid,
  .check-grid,
  .unit-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar,
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-lockup {
    gap: 14px;
  }

  .site-logo {
    width: 118px;
  }

  h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .form-card {
    padding: 18px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    display: grid;
  }

  .quote-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
