#pfa-form-root {
  --pfa-navy: #16233c;
  --pfa-grey: #5b6472;
  --pfa-line: #dde1e7;
  --pfa-accent: #2f6fed;
  max-width: 820px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--pfa-navy);
}
#pfa-form-root * { box-sizing: border-box; }
#pfa-form-root .pfa-card {
  background: #fff;
  border: 1px solid var(--pfa-line);
  border-radius: 12px;
  padding: 18px 18px 4px;
  margin-bottom: 15px;
}
#pfa-form-root .pfa-card h2 { font-size: 1.05rem; margin: 0 0 14px; }
#pfa-form-root .pfa-field { margin-bottom: 12px; }
#pfa-form-root label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
#pfa-form-root input,
#pfa-form-root select,
#pfa-form-root textarea {
  width: 100%;
  padding: 8px 10px;
  min-height: 39px;
  border: 1px solid var(--pfa-line);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
}
#pfa-form-root .pfa-radio-row { display: flex; gap: 16px; }
#pfa-form-root .pfa-radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
#pfa-form-root .pfa-radio-row input { width: auto; }
#pfa-form-root .pfa-checkbox-label { display: flex; gap: 8px; font-weight: 400; align-items: flex-start; }
#pfa-form-root .pfa-checkbox-label input { width: auto; margin-top: 3px; }
#pfa-form-root canvas.pfa-sigpad {
  border: 1px dashed var(--pfa-line);
  border-radius: 8px;
  width: 100%;
  height: 140px;
  touch-action: none;
}
#pfa-form-root .pfa-sig-clear { font-size: 0.8rem; color: var(--pfa-accent); background: none; border: none; cursor: pointer; padding: 4px 0; }
#pfa-form-root .pfa-hidden { display: none !important; }
#pfa-form-root button.pfa-submit {
  width: auto;
  min-width: 220px;
  padding: 14px 36px;
  background: var(--pfa-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: block !important;
  width: fit-content !important;
  min-width: 220px;
  padding: 14px 36px !important;
  margin: 24px auto 0 !important;
}
#pfa-form-root button.pfa-submit:disabled { opacity: 0.6; cursor: not-allowed; }
#pfa-form-root #pfaStatus { text-align: center; margin-top: 14px; font-size: 0.9rem; }

#pfa-form-root .pfa-success-message {
  background: #fff;
  border: 1px solid var(--pfa-line);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
}
#pfa-form-root .pfa-success-message h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}
#pfa-form-root .pfa-success-message p {
  margin: 6px 0;
  color: var(--pfa-grey);
  line-height: 1.6;
}


/* Hide native number spinners in case a browser/plugin converts a field back to type=number. */
#pfa-form-root input[type="number"]::-webkit-outer-spin-button,
#pfa-form-root input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#pfa-form-root input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

#pfa-form-root .pfa-terms-box {
  max-height: 220px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--pfa-line);
  border-radius: 8px;
  background: #f8f9fb;
  color: var(--pfa-grey);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: normal;
  margin-bottom: 12px;
}
#pfa-form-root .pfa-terms-box:focus { outline: 2px solid var(--pfa-accent); outline-offset: 2px; }
#pfa-form-root .pfa-terms-consent { margin-top: 10px; }


/* Searchable State of Incorporation dropdown — styled to match standard select menus. */
#pfa-form-root .pfa-state-select {
  position: relative;
  width: 100%;
}
#pfa-form-root .pfa-state-trigger {
  width: 100%;
  min-height: 42px;
  padding: 10px 40px 10px 12px;
  border: 1px solid var(--pfa-line);
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  position: relative;
}
#pfa-form-root .pfa-state-trigger.has-value { color: var(--pfa-navy); }
#pfa-form-root .pfa-state-trigger:focus {
  outline: none;
  border-color: var(--pfa-accent);
  box-shadow: 0 0 0 3px rgba(47,111,237,.12);
}
#pfa-form-root .pfa-state-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-65%) rotate(45deg);
  transition: transform .15s ease;
}
#pfa-form-root .pfa-state-select.is-open .pfa-state-arrow {
  transform: translateY(-30%) rotate(225deg);
}
#pfa-form-root .pfa-state-menu {
  position: absolute;
  z-index: 99999;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--pfa-line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(22,35,60,.16);
  overflow: hidden;
}
#pfa-form-root .pfa-state-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--pfa-line);
  background: #fff;
}
#pfa-form-root .pfa-state-search {
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--pfa-line);
  border-radius: 6px;
  font-size: 0.92rem;
}
#pfa-form-root .pfa-state-options {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0;
}
#pfa-form-root .pfa-state-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  color: var(--pfa-navy);
  text-align: left;
  font: inherit;
  font-size: 0.93rem;
  cursor: pointer;
}
#pfa-form-root .pfa-state-option:hover,
#pfa-form-root .pfa-state-option:focus,
#pfa-form-root .pfa-state-option[aria-selected="true"] {
  background: #f3f6fb;
  outline: none;
}
#pfa-form-root .pfa-state-option[hidden] { display: none; }

/* Progress, review, percentage, loading, and confirmation enhancements. */
#pfa-form-root .pfa-progress { margin:0 0 18px; padding:14px 16px; background:#fff; border:1px solid var(--pfa-line); border-radius:10px; }
#pfa-form-root .pfa-progress-bar { height:7px; border-radius:99px; background:#edf1f6; overflow:hidden; }
#pfa-form-root .pfa-progress-bar span { display:block; width:0; height:100%; background:#2563eb; transition:width .3s ease; }
#pfa-form-root .pfa-progress-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; color:var(--pfa-grey); font-size:.84rem; }
#pfa-form-root .pfa-progress-label strong { color:#2563eb; font-size:.92rem; }
#pfa-form-root .pfa-progress.is-complete .pfa-progress-bar span { background:#1d4ed8; }
#pfa-form-root .pfa-percent-wrap { position:relative; }
#pfa-form-root .pfa-percent-wrap input { padding-right:38px; }
#pfa-form-root .pfa-percent-wrap span { position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#667085; font-weight:600; }
#pfa-form-root .pfa-spinner { display:none; width:16px; height:16px; margin-left:9px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:pfa-spin .75s linear infinite; vertical-align:-3px; }
#pfa-form-root .pfa-submit.is-loading .pfa-spinner { display:inline-block; }
@keyframes pfa-spin { to { transform:rotate(360deg); } }
body.pfa-modal-open { overflow:hidden; }
#pfa-form-root .pfa-review-modal { position:fixed; inset:0; z-index:100000; background:rgba(15,23,42,.62); padding:24px; overflow:auto; }
#pfa-form-root .pfa-review-dialog { position:relative; width:min(760px,100%); margin:30px auto; background:#fff; border-radius:14px; box-shadow:0 24px 80px rgba(0,0,0,.24); padding:26px; }
#pfa-form-root .pfa-review-dialog h2 { margin:0 34px 6px 0; }
#pfa-form-root .pfa-review-intro { margin:0 0 18px; color:var(--pfa-grey); }
#pfa-form-root .pfa-review-close { position:absolute; right:16px; top:12px; border:0; background:transparent; font-size:28px; line-height:1; color:#667085; cursor:pointer; }
#pfa-form-root #pfaReviewContent section { margin:0 0 18px; padding:14px; border:1px solid var(--pfa-line); border-radius:9px; }
#pfa-form-root #pfaReviewContent h3 { margin:0 0 10px; font-size:1rem; }
#pfa-form-root .pfa-review-row { display:grid; grid-template-columns:minmax(150px, 38%) 1fr; gap:14px; padding:7px 0; border-top:1px solid #eef1f5; }
#pfa-form-root .pfa-review-row:first-of-type { border-top:0; }
#pfa-form-root .pfa-review-row span { color:var(--pfa-grey); }
#pfa-form-root .pfa-review-row strong { word-break:break-word; }
#pfa-form-root .pfa-review-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
#pfa-form-root .pfa-review-actions button { border-radius:8px; padding:11px 16px; font-weight:600; cursor:pointer; }
#pfa-form-root .pfa-review-edit { background:#fff; color:var(--pfa-navy); border:1px solid var(--pfa-line); }
#pfa-form-root .pfa-review-confirm { background:var(--pfa-navy); color:#fff; border:1px solid var(--pfa-navy); }
#pfa-form-root .pfa-success-check { width:54px; height:54px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; background:#eaf7ef; color:#15803d; font-size:28px; font-weight:700; }
#pfa-form-root .pfa-reference { display:inline-flex; flex-direction:column; gap:4px; margin-top:18px; padding:10px 16px; background:#f3f6fb; border:1px solid var(--pfa-line); border-radius:8px; }
#pfa-form-root .pfa-reference span { color:var(--pfa-grey); font-size:.75rem; text-transform:uppercase; letter-spacing:.5px; }
#pfa-form-root .pfa-reference strong { letter-spacing:.5px; }
@media (max-width:600px) { #pfa-form-root .pfa-review-row { grid-template-columns:1fr; gap:3px; } #pfa-form-root .pfa-review-actions { flex-direction:column-reverse; } #pfa-form-root .pfa-review-actions button { width:100%; } }

/* Repeating loan and owner rows */
#pfa-form-root .pfa-loan-row { display:grid; grid-template-columns:1.2fr 1fr 1fr 36px; gap:10px; align-items:end; margin-bottom:10px; padding:12px; border:1px solid var(--pfa-line); border-radius:9px; background:#f8fafc; }
#pfa-form-root .pfa-loan-row label,
#pfa-form-root .pfa-owner-grid label { font-size:.76rem; }
#pfa-form-root .pfa-add-row { border:1px solid var(--pfa-navy); background:#fff; color:var(--pfa-navy); border-radius:8px; padding:10px 14px; font-weight:700; cursor:pointer; }
#pfa-form-root .pfa-remove-row { width:36px; height:42px; border:1px solid #ef4444; color:#b91c1c; background:#fff; border-radius:8px; font-size:22px; cursor:pointer; }
#pfa-form-root .pfa-extra-owner-row { margin:12px 0; padding:14px; border:1px solid var(--pfa-line); border-radius:10px; background:#f8fafc; }
#pfa-form-root .pfa-owner-row-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
#pfa-form-root .pfa-remove-owner { border:0; background:transparent; color:#b91c1c; font-weight:700; cursor:pointer; }
#pfa-form-root .pfa-owner-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#pfa-form-root .pfa-owner-address,
#pfa-form-root .pfa-owner-signature { grid-column:1/-1; }
@media (max-width:700px) { #pfa-form-root .pfa-loan-row { grid-template-columns:1fr; } #pfa-form-root .pfa-remove-row { width:100%; } #pfa-form-root .pfa-owner-grid { grid-template-columns:1fr; } #pfa-form-root .pfa-owner-address, #pfa-form-root .pfa-owner-signature { grid-column:auto; } }


/* Two-column form layout: all standard fields appear two per row.
   Address, repeating groups, terms, and signatures remain full width. */
#pfa-form-root .pfa-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}
#pfa-form-root .pfa-card > h2 {
  grid-column: 1 / -1;
}
#pfa-form-root .pfa-card > .pfa-field {
  min-width: 0;
}
#pfa-form-root .pfa-card > .pfa-field-full {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  #pfa-form-root .pfa-card {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  #pfa-form-root .pfa-card > h2,
  #pfa-form-root .pfa-card > .pfa-field-full {
    grid-column: auto;
  }
}


/* Inline validation and error summary */
#pfa-form-root .pfa-invalid,
#pfa-form-root input.pfa-invalid,
#pfa-form-root select.pfa-invalid,
#pfa-form-root textarea.pfa-invalid,
#pfa-form-root canvas.pfa-invalid,
#pfa-form-root .pfa-state-trigger.pfa-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .10) !important;
}
#pfa-form-root .pfa-field-error {
  margin-top: 6px;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
}
#pfa-form-root #pfaStatus.pfa-error-summary {
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
  text-align: left;
}

#pfa-form-root .pfa-communication-consent {
  padding: 11px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--pfa-line);
  border-radius: 7px;
  background: #f8f9fb;
  color: var(--pfa-grey);
  font-size: 0.78rem;
  line-height: 1.5;
}
#pfa-form-root .pfa-communication-consent a {
  color: var(--pfa-accent);
  text-decoration: underline;
  font-weight: 600;
}

/* v10: one continuous form container and language selector */
#pfa-form-root .pfa-language-switcher {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin:-6px 0 14px;
}
#pfa-form-root .pfa-language-switcher label {
  margin:0;
  font-size:.82rem;
  color:var(--pfa-grey);
}
#pfa-form-root .pfa-language-switcher select {
  width:auto;
  min-width:130px;
  min-height:36px;
  padding:6px 30px 6px 10px;
  background:#fff;
}
#pfa-form-root #pfaForm {
  background:#fff;
  border:1px solid var(--pfa-line);
  border-radius:12px;
  padding:20px;
}
#pfa-form-root .pfa-card {
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
  margin:0 0 14px;
}
#pfa-form-root .pfa-card h2 {
  margin:4px 0 14px;
  padding-bottom:7px;
  border-bottom:1px solid var(--pfa-line);
}
#pfa-form-root .pfa-card:last-child { margin-bottom:4px; }
@media (max-width:700px) {
  #pfa-form-root #pfaForm { padding:14px; }
  #pfa-form-root .pfa-language-switcher { justify-content:space-between; }
}


/* v13: one continuous form card, edge-to-edge progress bar, no per-field cards */
#pfa-form-root { max-width: 820px; }
#pfa-form-root #pfaForm {
  position: relative;
  background: #fff;
  border: 1px solid var(--pfa-line);
  border-radius: 12px;
  padding: 0 20px 20px;
  overflow: visible;
  box-shadow: 0 10px 28px rgba(22,35,60,.06);
}
#pfa-form-root .pfa-progress {
  margin: 0 -20px 16px;
  padding: 0 16px 11px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--pfa-line);
  border-radius: 12px 12px 0 0;
  box-shadow: none;
  overflow: hidden;
}
#pfa-form-root .pfa-progress-bar {
  height: 8px;
  margin: 0 -16px 10px;
  border-radius: 12px 12px 0 0;
  background: #edf1f6;
  overflow: hidden;
}
#pfa-form-root .pfa-progress-bar span { border-radius: 0; }
#pfa-form-root .pfa-progress-label {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--pfa-grey);
  font-size: .84rem;
}
#pfa-form-root .pfa-language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  background: transparent;
  border: 0;
}
#pfa-form-root .pfa-language-switcher label { margin: 0; }
#pfa-form-root .pfa-language-switcher select { width: auto; min-width: 130px; }
#pfa-form-root .pfa-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0 0 14px;
}
#pfa-form-root .pfa-card h2 {
  margin: 4px 0 14px;
  padding: 0 0 7px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pfa-line);
  border-radius: 0;
}
#pfa-form-root .pfa-card > .pfa-field {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
}
#pfa-form-root .pfa-communication-consent {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--pfa-grey);
  font-size: .8rem;
  line-height: 1.55;
}
#pfa-form-root .pfa-communication-consent a {
  color: #1a1aee !important;
  font-weight: 400 !important;
  text-decoration: underline;
}
@media (max-width:700px) {
  #pfa-form-root #pfaForm { padding: 0 14px 14px; }
  #pfa-form-root .pfa-progress { margin-left: -14px; margin-right: -14px; }
  #pfa-form-root .pfa-language-switcher { justify-content: space-between; }
}


/* v14 consent links and checkbox alignment */
#pfa-form-root .pfa-communication-consent {
  margin: 0 0 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit;
  font-weight: 400;
}
#pfa-form-root .pfa-communication-consent a {
  color: #1a1aee !important;
  font-weight: 400 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  text-decoration: underline;
}
#pfa-form-root .pfa-checkbox-label,
#pfa-form-root .pfa-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1.35;
}
#pfa-form-root .pfa-checkbox-label input[type="checkbox"],
#pfa-form-root .pfa-radio-row input[type="radio"] {
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
}
#pfa-form-root .pfa-checkbox-label span { margin: 0; }


/* v15: screenshot-style progress panel and top language selector */
#pfa-form-root {
  max-width: 820px;
}
#pfa-form-root > .pfa-progress {
  margin: 0 0 14px;
  padding: 0 12px 14px;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: 0 5px 16px rgba(22,35,60,.08);
  overflow: hidden;
}
#pfa-form-root > .pfa-progress .pfa-progress-bar {
  height: 10px;
  margin: 0 -12px 12px;
  border-radius: 0;
  background: #c9d0dc;
  overflow: hidden;
}
#pfa-form-root > .pfa-progress .pfa-progress-bar span {
  height: 100%;
  background: #3f72f2;
  border-radius: 0;
}
#pfa-form-root > .pfa-progress .pfa-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  color: #60656f;
  font-size: .83rem;
}
#pfa-form-root > .pfa-progress .pfa-progress-label strong {
  color: #60656f;
  font-weight: 400;
  font-size: .83rem;
}
#pfa-form-root #pfaForm {
  position: relative;
  padding: 14px 38px 24px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 5px 18px rgba(22,35,60,.07);
  overflow: visible;
}
#pfa-form-root #pfaForm > .pfa-progress { display:none !important; }
#pfa-form-root .pfa-language-switcher {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin: 0 0 42px;
  padding: 0;
  border:0;
  background:transparent;
}
#pfa-form-root .pfa-language-switcher select {
  width:auto;
  min-width:210px;
  min-height:38px;
  padding:7px 30px 7px 8px;
  border:0;
  border-radius:0;
  background-color:transparent;
  color:#303d68;
  font-size:.92rem;
  cursor:pointer;
  box-shadow:none;
}
#pfa-form-root .pfa-form-title {
  margin: 0 0 28px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e1e4ea;
  text-align:center;
  color:#111;
  font-size:1.28rem;
  line-height:1.3;
  font-weight:700;
}
#pfa-form-root #pfaStatus.pfa-error-summary {
  display:block;
  scroll-margin-top:100px;
}
@media (max-width:700px) {
  #pfa-form-root #pfaForm { padding: 12px 16px 20px; }
  #pfa-form-root .pfa-language-switcher { margin-bottom:28px; }
  #pfa-form-root .pfa-language-switcher select { min-width:190px; }
  #pfa-form-root > .pfa-progress .pfa-progress-label { font-size:.76rem; }
  #pfa-form-root > .pfa-progress .pfa-progress-label strong { font-size:.76rem; }
}


/* v16: streamlined consent flow and unboxed acknowledgments */
#pfa-form-root .pfa-communication-consent {
  padding: 0 !important;
  margin: 6px 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--pfa-grey);
  font-size: 0.78rem;
  line-height: 1.55;
}
#pfa-form-root .pfa-communication-consent a {
  color: #1a1aee !important;
  font-weight: 400 !important;
  text-decoration: underline;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
#pfa-form-root .pfa-terms-box {
  padding: 0 !important;
  margin: 12px 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--pfa-grey);
}
#pfa-form-root .pfa-terms-consent { margin: 0 0 10px !important; }
#pfa-form-root .pfa-checkbox-label { align-items: center !important; }
#pfa-form-root .pfa-checkbox-label input[type="checkbox"] { margin-top: 0 !important; flex: 0 0 auto; }

/* v17: final web-form corrections */
/* Remove the unintended separator immediately above the first funding fields. */
#pfa-form-root #pfaFormFields > .pfa-card:first-child {
  border-top: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
#pfa-form-root #pfaFormFields > .pfa-card:first-child::before,
#pfa-form-root #pfaFormFields > .pfa-card:first-child::after {
  content: none !important;
  display: none !important;
}
/* Communication disclosure and electronic-signature acknowledgment stay plain white. */
#pfa-form-root .pfa-communication-consent,
#pfa-form-root .pfa-terms-box {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* Make invalid controls unmistakable, including grouped radios and checkboxes. */
#pfa-form-root .pfa-radio-row.pfa-invalid,
#pfa-form-root .pfa-checkbox-label.pfa-invalid {
  border: 1px solid #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.10) !important;
  padding: 9px 10px !important;
  background: #fffafa !important;
}
#pfa-form-root #pfaStatus.pfa-error-summary {
  display: block !important;
}


/* v20: cleaner section transition and roomier field spacing */
/* Business section has no visible heading or divider. */
#pfa-form-root .pfa-card[data-section-id="business"] > h2 {
  display: none !important;
}

/* Owner section heading is a centered, square-corner gray title bar. */
#pfa-form-root .pfa-card[data-section-id="owner"] > h2 {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 22px 0 28px !important;
  padding: 13px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f1f2f4 !important;
  color: #171717 !important;
  text-align: center !important;
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

/* Increase vertical breathing room between normal form fields. */
#pfa-form-root .pfa-card > .pfa-field {
  margin-bottom: 24px !important;
}

/* Business address ends naturally—no rule or decorative separator beneath it. */
#pfa-form-root .pfa-field:has(#businessAddress),
#pfa-form-root .pfa-field:has(#businessAddress)::before,
#pfa-form-root .pfa-field:has(#businessAddress)::after {
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* White agreement box with a thin border only. */
#pfa-form-root .pfa-terms-box {
  margin: 12px 0 18px !important;
  padding: 14px 16px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 0 !important;
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
  color: #333 !important;
  line-height: 1.6 !important;
}

@media (max-width: 700px) {
  #pfa-form-root .pfa-card[data-section-id="owner"] > h2 {
    margin: 16px 0 22px !important;
    font-size: 1.08rem !important;
  }
  #pfa-form-root .pfa-card > .pfa-field {
    margin-bottom: 20px !important;
  }
}

/* v21 reliability fixes */
.pfa-state-option { cursor: pointer; pointer-events: auto; }
.pfa-state-menu[hidden] { display: none !important; }
.pfa-review-status { margin: 12px 0; min-height: 20px; font-size: 14px; line-height: 1.45; }
.pfa-review-status.pfa-error-summary { color: #b42318; background: #fff1f0; border: 1px solid #f3b4ae; padding: 10px 12px; }

/* Center the application submit button */
#pfa-form-root .pfa-submit {
    display: block;
    width: fit-content !important;
    min-width: 220px;
    padding: 14px 36px;
    margin: 24px auto 0;
}
/* v1.24 optional post-submission bank statement upload */
#pfa-form-root .pfa-bank-upload {
  max-width: 610px;
  margin: 28px auto 0;
  padding: 22px;
  border: 1px solid var(--pfa-line);
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
}
#pfa-form-root .pfa-bank-upload h3 {
  margin: 0 0 8px;
  color: var(--pfa-navy);
  font-size: 1.05rem;
}
#pfa-form-root .pfa-bank-upload p {
  margin: 0 0 15px;
  color: var(--pfa-grey);
  font-size: .88rem;
  line-height: 1.55;
}
#pfa-form-root .pfa-bank-upload input[type="file"] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--pfa-line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
#pfa-form-root .pfa-bank-file-note {
  margin-top: 7px;
  color: #667085;
  font-size: .76rem;
}
#pfa-form-root .pfa-bank-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
#pfa-form-root .pfa-bank-actions button {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}
#pfa-form-root .pfa-bank-upload-button {
  border: 1px solid var(--pfa-navy);
  background: var(--pfa-navy);
  color: #fff;
}
#pfa-form-root .pfa-bank-skip-button {
  border: 1px solid var(--pfa-line);
  background: #fff;
  color: var(--pfa-navy);
}
#pfa-form-root .pfa-bank-actions button:disabled {
  opacity: .65;
  cursor: wait;
}
#pfa-form-root .pfa-bank-status {
  min-height: 18px;
  margin-top: 12px;
  color: var(--pfa-grey);
  font-size: .82rem;
  text-align: center;
}
#pfa-form-root .pfa-bank-status.is-error {
  color: #b42318;
  font-weight: 600;
}
#pfa-form-root .pfa-bank-upload.is-complete {
  text-align: center;
  background: #f4fbf6;
  border-color: #b8ddc4;
}
#pfa-form-root .pfa-bank-upload-success {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #def3e5;
  color: #15803d;
  font-size: 23px;
  font-weight: 800;
}
#pfa-form-root .pfa-bank-skipped {
  margin: 0 !important;
  text-align: center;
}
@media (max-width: 600px) {
  #pfa-form-root .pfa-bank-upload { padding: 17px; }
  #pfa-form-root .pfa-bank-actions { flex-direction: column; }
  #pfa-form-root .pfa-bank-actions button { width: 100%; }
}
