/* Apply form pages only (/apply/business/, /apply/real-estate/).
   Cognito look (gold-fade header, gold/black Submit, navy labels, 800px card)
   with roomier spacing so nothing is cut off (David, Nov 13 9:18 PM ET). */
@import url("https://www.cognitoforms.com/content/fonts/opensanscondensed/opensanscondensed.css");

:root {
  --gutter: 24px;
  --form-width: 800px;
  --card-pad: 36px;
  --field-gap: 22px;
  --section-gap: 32px;
  --gold: rgb(196, 175, 144);
  --navy: #2C3345;
  --ink: #000;
  --input-border: hsl(0, 0%, 56%);
  --input-color: #333;
  --placeholder: rgb(204, 204, 204);
  --link: rgb(194, 75, 35);
  --negative: hsl(2, 70%, 47%);
  --highlight: hsl(205, 98%, 53%);
  --condensed: "Open Sans Condensed", "Arial Narrow", Arial, Helvetica, sans-serif;
  --body: Arial, Helvetica, sans-serif;
}

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

html, body { margin: 0; padding: 0; }
html { height: 100%; }

body.cform-page {
  min-height: 100%;
  background: rgb(204, 204, 204);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: normal;
  line-height: 1.4;
}

/* Centered 800px card with page margins at every width, so the form
   never runs edge-to-edge or looks like a truncated blank page. */
.cform-shell {
  max-width: var(--form-width);
  width: calc(100% - 48px);
  margin: 40px auto;
  background: #fff;
  box-shadow: 0 0 10px hsla(0, 0%, 0%, .1), 1px 1px 2px hsla(0, 0%, 0%, .1);
  padding: var(--card-pad);
  overflow: visible;
}

@media (max-width: 767px) {
  :root { --card-pad: 20px; --field-gap: 20px; --section-gap: 32px; }
  .cform-shell {
    width: calc(100% - 32px);
    margin: 20px auto 32px;
  }
}

@media (max-width: 379px) {
  .cform-shell { width: calc(100% - 24px); }
}

.aform {
  margin: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  max-width: 100%;
}

.c-header {
  text-align: left;
  padding: 0;
  margin: 0 0 8px;
  background: transparent;
  color: var(--ink);
}

.c-header .c-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
}

.c-header-text { padding-top: 20px; }

.c-header h1 {
  margin: 0;
  font-family: var(--condensed);
  font-size: 1.85em;
  font-weight: bold;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
}

.c-desc { margin-top: 8px; font-family: var(--body); font-size: 1em; overflow-wrap: break-word; }
.c-desc p { margin: 0; }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.asr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.asec { margin: 0; padding: 0; border: 0; }

.asec h2 {
  margin: var(--section-gap) 0 12px;
  padding: 0;
  font-family: var(--condensed);
  font-size: 1.54em;
  font-weight: bold;
  line-height: 1.3;
  color: var(--navy);
  overflow-wrap: break-word;
}

.asec:first-of-type h2 { margin-top: 28px; }

/* 24-column grid. Column-gap 24px; rows use field-gap. */
.crow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 24px;
  row-gap: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--field-gap);
}

.crow:last-child { margin-bottom: 0; }

.col {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.col-4  { width: calc(16.6666666667% - 24px * 0.8333333333); }
.col-7  { width: calc(29.1666666667% - 24px * 0.7083333333); }
.col-8  { width: calc(33.3333333333% - 24px * 0.6666666667); }
.col-9  { width: calc(37.5% - 24px * 0.625); }
.col-10 { width: calc(41.6666666667% - 24px * 0.5833333333); }
.col-11 { width: calc(45.8333333333% - 24px * 0.5416666667); }
.col-12 { width: calc(50% - 12px); }
.col-14 { width: calc(58.3333333333% - 24px * 0.4166666667); }
.col-15 { width: calc(62.5% - 24px * 0.375); }
.col-16 { width: calc(66.6666666667% - 24px * 0.3333333333); }
.col-24 { width: 100%; }

/* Roomier desktop layout: only true half-and-half pairs (col-12) share a row;
   every other field gets the full card width so no text or dropdown is cut off. */
.crow { row-gap: var(--field-gap); }
/* (Nov 13 sizing match) Cognito column widths restored on desktop; phones still stack. */

/* Phone and narrow widths: one field per row so nothing is squeezed. */
@media (max-width: 699px) {
  .crow { column-gap: 0; }
  .crow > .col { width: 100%; flex: 1 1 100%; max-width: 100%; }
}

.fld { margin: 0; min-width: 0; max-width: 100%; }
.fld[hidden],
[hidden] { display: none !important; }

.aform label,
.aform .nlab {
  display: block;
  padding: 0 0 6px;
  margin: 0;
  color: var(--navy);
  font-family: var(--condensed);
  font-size: 1.08em;
  font-weight: bold;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.aform .req { color: var(--negative); font-weight: bold; }

.aform input[type=text],
.aform input[type=email],
.aform input[type=tel],
.aform input[type=number],
.aform input[type=date],
.aform select,
.aform textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.3;
  color: var(--input-color);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 0;
  box-shadow: none;
  appearance: auto;
}

.aform textarea { min-height: 88px; resize: vertical; }

.aform input::placeholder,
.aform textarea::placeholder { color: var(--placeholder); opacity: 1; }

.aform input:focus,
.aform select:focus,
.aform textarea:focus {
  outline: 2px solid var(--highlight);
  outline-offset: 0;
  box-shadow: 0 0 1px 2px #fff;
}

.aform [aria-invalid=true] { border-color: var(--negative); }

.aform input[readonly] {
  background: #fff;
  color: var(--input-color);
  border-style: solid;
}

.aform .ferr {
  color: var(--negative);
  font-size: 0.875em;
  margin: 6px 0 0;
}

.aform .ahelp {
  margin: 0 0 8px;
  font-size: 0.875em;
  line-height: 1.45;
  color: var(--navy);
  font-weight: normal;
  font-family: var(--body);
  overflow-wrap: break-word;
}

.aform .acontent {
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: break-word;
}

.aform .acontent a,
.aform a {
  color: var(--link);
}

.namefld .arow {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  align-items: flex-start;
  max-width: 100%;
}

.namefld .arow > .fld {
  flex: 1 1 0;
  min-width: 0;
  width: calc(50% - 8px);
  max-width: 100%;
}

@media (max-width: 699px) {
  .namefld .arow { column-gap: 0; row-gap: var(--field-gap); }
  .namefld .arow > .fld { width: 100%; flex: 1 1 100%; }
}

.aform .radios,
.aform .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 4px 0 0;
  max-width: 100%;
}

.aform .rlab,
.aform .clab {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--body);
  font-size: 1em;
  font-weight: normal;
  color: var(--navy);
  margin: 0;
  cursor: pointer;
  padding-top: 0;
  overflow-wrap: break-word;
  max-width: 100%;
}

.aform .rlab input,
.aform .clab input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.ts-box { margin: 8px 0 0; min-height: 65px; max-width: 100%; overflow: hidden; }

.anav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 28px 0 0;
}

.anav button,
.asubmit {
  flex: 0 0 auto;
  width: auto;
  min-width: 80px;
  min-height: 44px;
  margin: 0;
  padding: 10px 20px;
  font-family: var(--condensed);
  font-size: 1.08em;
  font-weight: normal;
  line-height: 1.3;
  color: #000;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 3px;
  cursor: pointer;
}

.anav button:hover,
.asubmit:hover { border-color: #000; }

.anav button:focus-visible,
.asubmit:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

.anav button:disabled,
.asubmit:disabled { opacity: 0.6; cursor: wait; }

.aform .fnote.err {
  color: var(--negative);
  font-size: 1em;
  text-align: left;
  margin: 12px 0 0;
}

/* Long wording stays fully visible (see form-fit.js). */
.aform .phint { margin: -2px 0 6px; font-size: 14px; line-height: 1.4; color: #6b7280; }
.aform textarea.dispfld { resize: none; overflow: hidden; min-height: 44px; line-height: 1.45; white-space: pre-wrap; }

/* Homepage-style top band (Nov 13): full-width gold-to-light fade with the
   site logo, and a gold line underneath, running edge to edge. */
.c-band {
  display: flex;
  justify-content: center;
  padding: 17px 16px 16px;
  background: linear-gradient(180deg, #C4AF90 0, #F0EFF2 90px, #F0EFF2 100%);
  border-bottom: 2px solid #C4AF90;
}
.c-band img { height: 159px; width: auto; max-width: 100%; display: block; }
.c-header-text { padding-top: 0; }
@media (max-width: 767px) {
  .c-band { padding: 12px 12px 11px; }
  .c-band img { height: 110px; }
}

/* Nov 13 (2): the band sits inside the form card, flush with the card's
   top and side edges (no white border), gold line under the logo. */
.cform-shell { padding-top: 0; }
.cform-shell > .c-band {
  margin: 0 calc(-1 * var(--card-pad)) 28px;
}

/* Nov 13 (3): Yes/No radio buttons use the Cognito form's highlight blue. */
.aform .rlab input[type=radio] { accent-color: hsl(205, 98%, 53%); }

/* Nov 13 (4): softer box lines (lighter gray, slightly rounded corners). */
.aform input[type=text], .aform input[type=email], .aform input[type=tel],
.aform input[type=number], .aform input[type=date], .aform input:not([type]),
.aform select, .aform textarea {
  border-color: hsl(0, 0%, 76%);
  border-radius: 2px;
  transition: border-color .3s, box-shadow .3s;
}
.aform input:hover, .aform select:hover, .aform textarea:hover { border-color: hsl(0, 0%, 62%); }
.aform [aria-invalid=true], .aform [aria-invalid=true]:hover { border-color: var(--negative); }

/* Nov 13 (5): sizing matched to the Cognito theme: 13px base font, 1.08em labels,
   1.85em title, 1.54em section headings, inputs 13px with 8px/10px padding,
   25px card gutter, 800px form, logo 300x159 inside a 225px header band. */
body.cform-page { font-size: 13px; }
:root { --card-pad: 25px; --field-gap: 18px; --section-gap: 28px; }
@media (max-width: 767px) { :root { --card-pad: 16px; --field-gap: 16px; --section-gap: 24px; } }
.aform input[type=text], .aform input[type=email], .aform input[type=tel],
.aform input[type=number], .aform input[type=date], .aform input:not([type]),
.aform select, .aform textarea {
  font-size: 13px; line-height: 1.3; padding: 8px 10px; min-height: 35px;
}
.aform textarea { min-height: 70px; }
.aform textarea.dispfld { min-height: 35px; }
.aform .phint { font-size: 12px; margin: -2px 0 5px; }
.aform .rlab input, .aform .clab input { width: 15px; height: 15px; flex: 0 0 15px; margin: 1px 0 0; }
.asubmit { min-height: 35px; padding: 8px 20px; }
.cform-shell > .c-band { padding: 3.5% 0 4.5%; }
.c-band img { width: 37.5%; height: auto; }
@media (max-width: 767px) { .cform-shell > .c-band { padding: 3.5% 0 4.5%; } .c-band img { height: auto; } }
/* Keep the credit-score dropdown text whole at Cognito sizing. */
@media (min-width: 700px) {
  .crow > .col:has(#r-score) { width: calc(37.5% - 15px); }
  .crow > .col:has(#r-worried) { width: auto; flex: 1 1 0; }
}

/* Nov 13 (6): Cognito shows read-only fields as plain text, not boxes. */
.aform textarea.dispfld {
  border: 0 !important; background: transparent; padding: 0; min-height: 0;
  font-size: 13px; line-height: 1.4; color: var(--ink); box-shadow: none; outline: 0;
}
.aform textarea.dispfld:hover { border: 0; }
/* No empty spacer where Cognito has nothing (anti-bot box is unused until a key is set). */
.ts-box:not(:has(iframe)) { min-height: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }

/* Nov 13 (8): David's bottom row - Submit on the left, Return to home page on the right. */
.anav { align-items: center; gap: 12px; }
.ahome {
  margin-left: auto; display: inline-flex; align-items: center; min-height: 35px;
  padding: 8px 20px; font-family: var(--condensed); font-size: 1.08em; line-height: 1.3;
  color: #000; background: #fff; border: 1px solid var(--gold); border-radius: 3px; text-decoration: none;
}
.ahome:hover { border-color: #000; }
.ahome:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
/* Nov 13 (9): David - both bottom buttons gold. */
.aform .ahome, .ahome { color: #000; background: var(--gold); border-color: var(--gold); }
.ahome:hover { border-color: #000; }

/* Nov 13 (10): line-for-line match to Cognito at desktop width (Mark's cross-check,
   David approved 9:57 PM ET). 38px card gutter -> 724px content, 350px half boxes. */
@media (min-width: 768px) { :root { --card-pad: 38px; --field-gap: 26px; --section-gap: 55px; } }
.asec h2 { color: #000; margin-bottom: 14px; }
@media (min-width: 768px) { .asec:first-of-type h2 { margin-top: 45px; } }
.aform .acontent { line-height: 1.4; }
/* Owner Name: First/Last are placeholders inside the boxes (labels kept for screen readers). */
.namefld .arow { column-gap: 12px; }
.namefld label.asr { padding: 0; }
/* A row whose only fields are hidden conditionals takes no space (no stray gaps). */
.crow:has(.fld):not(:has(.fld:not([hidden]))) { display: none; }
/* Cognito column widths: credit score is a 7/24 column, the note beside it 15/24. */
@media (min-width: 700px) {
  .crow > .col:has(#r-score) { width: calc(29.1666666667% - 24px * 0.7083333333); }
  .crow > .col:has(#r-worried) { width: calc(62.5% - 24px * 0.375); flex: 0 1 auto; }
}
/* Dropdowns: starting text in placeholder gray until a real choice is picked. */
.aform select:has(option[value=""]:checked) { color: var(--placeholder); }
.aform select option { color: var(--input-color); }
/* Closing date: hint text + calendar icon while empty (see form-fit.js). */
.aform input.dateph {
  padding-right: 30px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23555' stroke-width='1.2'%3E%3Crect x='1.5' y='2.5' width='11' height='10' rx='1'/%3E%3Cpath d='M1.5 5.5h11M4.5 1v3M9.5 1v3'/%3E%3C/svg%3E") no-repeat right 9px center;
}
/* Tax-lien checkboxes: None / Federal / State on one row, then one per row. */
.aform .checks:has(#b-tax-0) { gap: 6px 13px; }
.aform .checks:has(#b-tax-0) .clab:nth-child(n+4) { flex-basis: 100%; }
.aform .rlab, .aform .clab { gap: 6px; }
.aform .radios { gap: 6px 13px; }

/* Nov 13 (10b): both bottom buttons identical (David 10:01 PM ET). */
.anav { flex-wrap: nowrap; gap: 12px; }
.aform .anav .asubmit, .aform .anav .ahome {
  box-sizing: border-box; flex: 0 0 auto; width: min(180px, calc(50% - 6px)); min-width: 0;
  height: 44px; min-height: 0; margin: 0; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap;
  font-family: var(--condensed); font-size: 14px; font-weight: normal; line-height: 1.3;
  color: #000; background: var(--gold); border: 1px solid var(--gold); border-radius: 3px; text-decoration: none;
}
.aform .anav .ahome { margin-left: auto; }
.aform .anav .asubmit:hover, .aform .anav .ahome:hover { border-color: #000; }

/* Nov 13 (10c): softer focus highlight on boxes (David 10:02 PM ET).
   Was: outline 2px solid hsl(205,98%,53%) + box-shadow 0 0 1px 2px #fff. */
.aform input:not([type=radio]):not([type=checkbox]):focus,
.aform select:focus, .aform textarea:focus,
.aform input:not([type=radio]):not([type=checkbox]):focus-visible,
.aform select:focus-visible, .aform textarea:focus-visible {
  outline: 0; border-color: hsl(205, 60%, 70%); box-shadow: 0 0 0 3px hsla(205, 70%, 60%, .18);
}
/* Section description line (Credit & Existing Debt) sits tight under its heading, like Cognito. */
@media (min-width: 768px) { .asec h2 + .crow:has(p.ahelp) { margin-top: -13px; margin-bottom: 11px; } }

/* Nov 13 (10d): logo rendered at Cognito's size (David 10:03 PM ET). Cognito's banner fills the
   form's content width and its logo graphic is 300/800 of the banner: 271.5x144 at desktop. */
.c-band img { width: calc((100% - 2 * var(--card-pad)) * 0.375); height: auto; }
/* Radio / checkbox rows: Cognito's tighter rhythm (no label bottom padding, 7px between rows). */
.aform .rlab, .aform .clab { padding-bottom: 0; }
.aform .radios, .aform .checks { margin-top: 0; }
.aform .checks:has(#b-tax-0) { row-gap: 7px; }
@media (min-width: 768px) {
  .hp + .crow { margin-top: 32px; }
  .anav { padding-top: 64px; }
}
.aform input + .ahelp { margin: 5px 0 0; }
@media (min-width: 768px) { #apply-realestate .anav { padding-top: 12px; } }

/* Nov 13 (10): David - labels and Yes/No text pure black like Cognito. */
.aform label, .aform .nlab, .aform .rlab, .aform .clab { color: #000; }
.aform .req { color: var(--negative); }

/* Nov 13 (11): David - logo links home; home button removed. */
.c-band > a.c-home { display: contents; }
.c-band > a.c-home:focus-visible img { outline: 2px solid hsl(205,60%,70%); outline-offset: 3px; }
.c-band > a.c-home img { cursor: pointer; }

/* Nov 13 (12): David - bold Submit text. */
.aform .anav .asubmit { font-weight: bold; }

/* Nov 13 (13): David - no gold line under the header band. */
.cform-shell > .c-band, .c-band { border-bottom: 0; }

/* Nov 13 (14): David - Business contact email/phone text matches Real Estate (dark gray, not red-orange). */
.aform .acontent a, .aform .acontent a:visited { color: var(--input-color); text-decoration: none; }
.aform .acontent a:hover { text-decoration: underline; }

/* Nov 13 (15): David - lighter gray around the form (was rgb(204,204,204)). Shared by both forms so they stay matched. */
body.cform-page { background: rgb(224, 224, 224); }
