:root {
  --ink: #151824;
  --muted: #687083;
  --line: #dfe4ec;
  --field: #f8fafc;
  --paper: #ffffff;
  --soft: #f2f5f8;
  --navy: #1e2358;
  --red: #7e1d28;
  --red-strong: #9d1f30;
  --focus: #2d62c8;
  --shadow: 0 20px 60px rgba(21, 24, 36, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  color: #fff;
  background: linear-gradient(180deg, var(--navy), #11142f);
}

.brand-lockup {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
}

.brand-lockup img {
  display: block;
  width: 100%;
  height: auto;
}

.property-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.property-card strong {
  line-height: 1.35;
}

.property-card span:last-child {
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-panel .eyebrow {
  color: #f3c8ce;
}

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

.steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.steps li.active {
  color: #fff;
  font-weight: 700;
}

.steps li.active::before {
  background: var(--red-strong);
}

.support-note {
  margin: auto 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.45;
}

.form-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 40px 26px;
  border-bottom: 1px solid var(--line);
}

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.5;
}

.progress-wrap {
  flex: 0 0 190px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7ebf1;
}

#progressBar {
  width: 12.5%;
  height: 100%;
  background: var(--red-strong);
  transition: width 180ms ease;
}

form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.page {
  display: none;
  padding: 34px 40px 24px;
}

.page.active {
  display: block;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 22px;
}

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

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

label {
  display: grid;
  gap: 8px;
  color: #323849;
  font-size: 14px;
  font-weight: 700;
}

label span,
.hint,
small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 98, 200, 0.12);
}

.repeat-panel,
.legal-box {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.adult-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.adult-row:last-child {
  border-bottom: 0;
}

.choice-block {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.choice-block legend {
  padding: 0 6px;
  font-weight: 700;
}

.choice-block label,
.confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.choice-block input,
.confirm-row input {
  width: auto;
  min-height: auto;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.upload-tile {
  min-height: 150px;
  place-content: center;
  padding: 18px;
  border: 1px dashed #b8c1cf;
  border-radius: 6px;
  background: var(--field);
  text-align: center;
  cursor: pointer;
}

.upload-tile input {
  display: none;
}

.upload-tile span {
  color: var(--ink);
  font-size: 16px;
}

.legal-box {
  max-height: 230px;
  overflow: auto;
  padding: 18px;
  color: #42495a;
  line-height: 1.55;
}

.signature-line {
  margin-top: 22px;
}

.confirm-row {
  margin-top: 16px;
  color: #323849;
}

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

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  color: #fff;
  background: var(--red-strong);
}

.secondary,
.ghost-button {
  color: var(--navy);
  background: #e9edf5;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload-body {
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(30, 35, 88, 0.94), rgba(126, 29, 40, 0.9)),
    var(--navy);
}

.upload-shell {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.25fr);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
}

.upload-hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(180deg, #1e2358, #11142f);
}

.upload-logo {
  max-width: 300px;
}

.upload-copy {
  display: grid;
  gap: 14px;
}

.upload-copy .kicker {
  color: #f3c8ce;
}

.upload-copy h1 {
  font-size: 36px;
  max-width: 520px;
}

.upload-copy p:last-child {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.upload-summary {
  display: grid;
  gap: 12px;
  margin: auto 0 0;
}

.upload-summary div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.upload-summary dt,
.upload-summary dd {
  margin: 0;
}

.upload-summary dt {
  color: #f3c8ce;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.upload-summary dd {
  margin-top: 6px;
  line-height: 1.35;
}

.upload-panel {
  min-width: 0;
  padding: 42px;
}

.document-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.document-checklist article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
}

.document-checklist span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--red-strong);
  font-weight: 700;
}

.document-checklist h3 {
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.2;
}

.document-checklist p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.upload-callout {
  margin-top: 22px;
  padding: 18px;
  border-left: 5px solid var(--red-strong);
  background: #fff5f6;
}

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

.upload-callout p {
  margin: 0;
  color: #42495a;
  line-height: 1.5;
}

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

.upload-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 22px;
  font-weight: 700;
  text-decoration: none;
}

.upload-button.primary {
  color: #fff;
}

.upload-button.secondary {
  color: var(--navy);
}

.upload-support {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    grid-template-columns: 1fr;
    border: 0;
  }

  .brand-panel {
    padding: 18px;
    overflow: hidden;
  }

  .brand-lockup {
    max-width: 280px;
  }

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

  .steps li {
    font-size: 12px;
  }

  .steps li::before {
    width: 24px;
    height: 24px;
  }

  .support-note {
    display: none;
  }

  .topbar,
  .page,
  .form-actions {
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: hidden;
  }

  .topbar {
    flex-direction: column;
  }

  .progress-wrap {
    width: 100%;
    flex-basis: auto;
  }

  h1 {
    font-size: 27px;
  }

  .field-grid.two,
  .field-grid.three,
  .adult-row,
  .upload-grid,
  .upload-shell,
  .document-checklist {
    grid-template-columns: 1fr;
  }

  .upload-body {
    display: block;
    padding: 0;
  }

  .upload-shell {
    min-height: 100vh;
  }

  .upload-hero,
  .upload-panel {
    padding: 22px;
  }

  .upload-copy h1 {
    font-size: 30px;
  }
}

@media (max-width: 520px) {
  .shell,
  .form-panel,
  .brand-panel {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .steps {
    display: none;
  }

  .brand-panel {
    gap: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .property-card {
    padding: 14px;
  }

  .topbar,
  .page,
  .form-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
  }

  button {
    width: 100%;
  }

  .upload-actions {
    display: grid;
  }

  .document-checklist article {
    min-height: 0;
  }
}
