/* WCF - Online Application
   Coded from "WCF - Online Application.fig" (1440px desktop frames). */

:root {
  --blue-600: #2563eb;   /* field strokes, links, radio dots */
  --blue-700: #2f62d3;   /* primary buttons, dividers, tracker rings */
  --blue-400: #438ef6;   /* phone button, active tracker dot, cert box */
  --gray-500: #6b7280;   /* placeholder / label text */
  --red-600: #dc2626;
  --green: #0d9d00;
  --black: #000;
  --white: #fff;

  --col: 644px;          /* form column width */
  --gap: 12px;           /* gutter between the two field columns */
  --row: 10px;           /* gap between field rows */
  --field-h: 35px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  color: var(--black);
  background: var(--white);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }

/* ---------- Top Menu Bar ---------- */
.top-menu {
  position: relative;
  z-index: 20;
  background: var(--white);
  box-shadow: 0 4px 4px rgba(0, 0, 0, .08);
}
.top-menu__inner {
  max-width: 1440px;
  min-height: 72px;
  margin: 0 auto;
  padding: 11px 90px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.top-menu__logo { flex: none; }
.top-menu__logo img { width: 127px; height: 44px; }
.top-menu__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 52px;
}
.top-menu__link,
.top-menu__btn {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.top-menu__link:hover { color: var(--blue-700); }
.top-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 49px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--white);
}
.top-menu__btn--primary { background: var(--blue-700); min-width: 184px; }
.top-menu__btn--phone { background: var(--blue-400); min-width: 147px; }
.top-menu__btn:hover { filter: brightness(.93); }

/* ---------- Page shell ---------- */
.app {
  flex: 1 0 auto;
  width: 100%;
  padding: 51px 20px 62px;
}

.wizard {
  max-width: var(--col);
  margin: 0 auto;
}

/* ---------- Tracker ---------- */
.tracker {
  --pitch: 173px;
  list-style: none;
  margin: 0 auto 51px;
  padding: 0;
  display: flex;
  justify-content: center;
  max-width: calc(var(--pitch) * 5);
}
.tracker__step {
  position: relative;
  flex: 0 1 var(--pitch);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* connector to the previous step */
.tracker__step + .tracker__step::before {
  content: "";
  position: absolute;
  top: 14.5px;
  left: calc(-50% + 14px);
  right: calc(50% + 14px);
  border-top: .5px solid var(--gray-500);
}
.tracker__dot {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: .75px solid var(--blue-700);
  border-radius: 50%;
  background: var(--white);
  cursor: default;
}
.tracker__step.is-visited .tracker__dot { cursor: pointer; }
.tracker__step.is-active .tracker__dot::after {
  content: "";
  position: absolute;
  inset: 1.25px;
  border-radius: 50%;
  background: var(--blue-400);
}
.tracker__label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}

/* ---------- Step typography ---------- */
.step__title {
  margin: 0;
  padding: 0 2px 9.25px;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  border-bottom: .75px solid var(--blue-700);
}
.section-title {
  margin: 24px 0 8px;
  padding-left: 2px;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
}
.section-title--tight { margin-bottom: 10px; }
.section-title--q { margin-bottom: 17px; }
.step[data-step="4"] { padding-bottom: 15px; }
.step[data-step="5"] { padding-bottom: 21px; }
.question {
  margin: 0 0 10px;
  padding-left: 2px;
  font-size: 14px;
  line-height: 17px;
}

/* ---------- Field grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--row) var(--gap);
}
.grid--half { gap: var(--row) 10px; }
.grid--spaced { margin-top: 24px; }
.grid--followup { margin-top: 24px; }
.grid__full { grid-column: 1 / -1; }

/* ---------- Text fields ---------- */
.field {
  display: block;
  width: 100%;
  height: var(--field-h);
  padding: 0 6px 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  border: .5px solid var(--blue-600);
  border-radius: 4px;
  outline: none;
  appearance: none;
}
.field::placeholder { color: var(--gray-500); opacity: 1; }
.field:focus { border-width: 1px; box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
.field.is-invalid,
.select.is-invalid .select__btn { border: 1px solid var(--red-600); }

/* ---------- Dropdown (custom select) ---------- */
.select { position: relative; min-width: 0; }
.select > select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.select__btn {
  display: block;
  width: 100%;
  height: var(--field-h);
  padding: 0 28px 0 14px;
  text-align: left;
  font-size: 14px;
  color: var(--gray-500);
  background: var(--white);
  border: .5px solid var(--blue-600);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.select.has-value .select__btn { color: var(--black); }
.select__btn:focus-visible { outline: none; border-width: 1px; box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
/* triangle */
.select__btn::after,
.select__head::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 13px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--gray-500);
  border-radius: 1px;
}
.select__panel {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  padding-bottom: 6px;
  background: var(--white);
  border: .5px solid var(--blue-600);
  border-radius: 4px;
  color: var(--gray-500);
  font-size: 14px;
}
.select__head {
  position: relative;
  height: 34px;
  padding: 0 28px 0 14px;
  line-height: 34px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.select__head::after {
  border-top: 0;
  border-bottom: 9px solid var(--gray-500);
}
.select__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 276px;
  overflow-y: auto;
  outline: none;
}
.select__option {
  padding: 3px 14px;
  line-height: 17px;
  cursor: pointer;
}
.select__option.is-active { background: rgba(67, 142, 246, .15); color: var(--black); }
.select__option[aria-selected="true"] { color: var(--black); font-weight: 500; }

/* ---------- Radios & checkboxes ---------- */
.radio,
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 15px;
  cursor: pointer;
}
.radio input,
.check input,
.property input {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  background: var(--white);
  border: .5px solid var(--black);
  cursor: pointer;
}
.radio input,
.property input { border-radius: 50%; }
.radio input:checked,
.property input:checked {
  background: radial-gradient(circle closest-side, var(--blue-600) 0 calc(100% - 1.5px), transparent calc(100% - 1px));
}
.check input:checked {
  background: var(--blue-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2l2.8 2.8L11 4.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  border-color: var(--blue-600);
}
.check.is-invalid input { border: 1px solid var(--red-600); }
.check--row { margin: 12px 0; }
.check--lg {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 17px;
}
.check--lg input { margin-top: 2px; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}
.question + .radio-row { margin-top: 0; }
.question + .radio-row .radio { gap: 6px; margin-right: 10px; }

.required-note {
  margin: 17px 0 0;
  padding-left: 14px;
  font-size: 12px;
  line-height: 15px;
  color: var(--red-600);
}

/* ---------- Property type picker ---------- */
.property-types {
  /* wider than the form column, centred on the page (as in the design) */
  width: 900px;
  max-width: calc(100vw - 40px);
  margin: 31px 0 0 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 0;
}
.property {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}
.property__icon {
  height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.property input {
  width: 20px;
  height: 20px;
  margin: 14px 0;
}
.property__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
}

/* ---------- Owners / repeatable rows ---------- */
.owners { margin-top: var(--row); display: grid; gap: var(--row); }
.owner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--row) var(--gap); }
#guaranty-ack { display: none; }
.owner #guaranty-ack { display: inline-flex; }

.repeat { display: grid; gap: var(--row); }
.repeat__label {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  padding-left: 2px;
  font-size: 12px;
  line-height: 15px;
}
.guarantor .field { max-width: 328px; }
.lender {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 162px 162px;
  gap: var(--row) var(--gap);
  align-items: center;
}
.lender .remove-link { position: absolute; left: calc(100% + 12px); top: 10px; }

.add-link,
.remove-link {
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  line-height: 15px;
  color: var(--blue-600);
  cursor: pointer;
}
.add-link { display: block; margin: 8px 0 0 2px; }
#add-guarantor { margin-top: 10px; }
.add-link:hover,
.remove-link:hover { text-decoration: underline; }

/* ---------- Date field ---------- */
.date-field { position: relative; }
.date-field .field { padding-right: 44px; }
.date-field__btn {
  position: absolute;
  top: 0;
  right: 6px;
  width: 37px;
  height: var(--field-h);
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.date-field__native {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  pointer-events: none;
}

/* ---------- Review & Summary ---------- */
.review__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 24px;
  padding: 0 0 9.25px 2px;
  border-bottom: .75px solid var(--blue-700);
}
.review__head h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 19px; }
.review__edit {
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  line-height: 19px;
  color: var(--blue-600);
  cursor: pointer;
}
.review__edit:hover { text-decoration: underline; }
.review__list { margin: 23px 0 0; padding-left: 2px; }
.review__row {
  display: grid;
  grid-template-columns: 384px minmax(0, 1fr);
  font-size: 14px;
  line-height: 17px;
}
.review__row + .review__row { margin-top: 10px; }
.review__row dt, .review__row dd { margin: 0; }
.review__row dt { padding-right: 12px; }
.review__row dd { overflow-wrap: anywhere; }

.cert {
  margin: 34px -15px 0;
  padding: 23px 14.25px 24px;
  background: rgba(67, 142, 246, .15);
  border: .75px solid var(--blue-400);
  border-radius: 7px;
}
.cert__title {
  margin: 0 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  color: var(--blue-700);
}
.cert .check--lg { margin-left: 2px; }
.cert__note {
  margin: 1px 0 0 24px;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
  color: var(--green);
}
.cert__group {
  margin: 11px 0 11px 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 17px;
  color: var(--gray-500);
}

/* ---------- Buttons / actions ---------- */
.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
  margin-top: 35px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 186px;
  height: 58px;
  padding: 0 15px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  background: var(--blue-700);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, .1);
  cursor: pointer;
}
.btn:hover { background: #2856bd; }
.btn:active { transform: translateY(1px); }
.review-link {
  position: absolute;
  top: 100%;
  right: -3.5px;
  width: 193px;
  margin: 15px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
  color: var(--blue-600);
  text-decoration: underline;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.form-error {
  align-self: stretch;
  margin: -15px 0 16px;
  font-size: 12px;
  line-height: 15px;
  color: var(--red-600);
}

/* ---------- Thank You ---------- */
.thank-you {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 88px 0 149px;
}
.thank-you__logo { width: 437px; }
.thank-you__title {
  margin: 27px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  outline: none;
}
.thank-you__text {
  margin: 7px 0 63px;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
}

/* ---------- Footer ---------- */
.footer {
  flex: none;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  line-height: 15px;
}
.footer__inner {
  position: relative;
  max-width: 1440px;
  min-height: 310px;
  margin: 0 auto;
  padding: 32px 90px 54px;
  display: grid;
  grid-template-columns: 331px 221px auto;
  justify-content: start;
}
.footer__logo { width: 129px; height: 44px; margin-bottom: 15px; }
.footer__col p { margin: 0 0 15px; }
.footer__col strong { font-weight: 600; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { text-decoration: underline; }
.footer__col--links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 59px;
}
.footer__link {
  margin-bottom: 15px;
  font-weight: 600;
  text-decoration: underline !important;
}
.footer__sublink {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 17px;
}
.footer__copy {
  position: absolute;
  left: 90px;
  bottom: 22px;
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .top-menu__inner { padding-left: 32px; padding-right: 32px; }
  .top-menu__nav { gap: 8px 28px; }
  .footer__inner { padding-left: 32px; padding-right: 32px; }
  .footer__copy { left: 32px; }
}

@media (max-width: 960px) {
  .top-menu__link { display: none; }
  .property-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lender .remove-link { position: static; grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 720px) {
  .app { padding-top: 32px; }
  .tracker { margin-bottom: 32px; }
  .tracker__label { font-size: 10px; line-height: 13px; padding: 0 2px; }
  .cert { margin-left: 0; margin-right: 0; }
  .review__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .footer__col--contact { grid-column: 1 / -1; }
  .footer__col--links { padding-top: 16px; }
}

@media (max-width: 560px) {
  .top-menu__inner { padding: 11px 16px; gap: 12px; }
  .top-menu__btn--primary { display: none; }
  .grid, .owner { grid-template-columns: minmax(0, 1fr); }
  .grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lender { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lender .field:first-child { grid-column: 1 / -1; }
  .property-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { align-items: stretch; }
  .btn { width: 100%; }
  .review-link { position: static; width: 100%; }
  .thank-you { padding: 40px 0; }
  .thank-you__text { margin-bottom: 40px; }
  .thank-you .btn { width: 186px; }
}
