:root{
  --bg:#eef3f8;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#5f6f84;
  --border:#d8e2ee;
  --primary:#0b1f45;
  --primary-600:#12346d;
  --success:#22c55e;
  --danger:#dc2626;
  --warning:#f97316;
  --shadow:0 14px 36px rgba(15,23,42,.08);
  --radius:16px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#f8fafc 0%,var(--bg) 100%);
}

body:has(main.submitDealPage){
  background:#ffffff;
}

body:has(main.borrowerApplicationPage){
  background:#f5f8fb;
}

.borrowerApplicationPage{
  --borrower-brand-primary:#0b1f45;
  --borrower-brand-accent:#2d6cdf;
  --borrower-surface-start:#ffffff;
  --borrower-surface-end:#eef3f8;
  --borrower-panel:#ffffff;
  min-height:0;
  background:linear-gradient(180deg,var(--borrower-surface-start) 0%,var(--borrower-surface-end) 100%);
  padding:18px 18px 22px;
  overflow-x:hidden;
}

.borrowerApplicationEmbed{
  padding:0;
  background:#ffffff;
}

.borrowerApplicationHeader,
.borrowerApplicationIntro{
  max-width:1180px;
  margin:0 auto 14px;
  background:color-mix(in srgb, var(--borrower-panel) 94%, #ffffff);
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow);
}

.borrowerApplicationHeader{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(160px, 300px) minmax(0, 1fr);
  align-items:center;
  justify-content:center;
  gap:24px;
  padding:22px 24px;
  text-align:left;
  overflow:hidden;
}

.borrowerApplicationCompany{
  min-width:0;
  justify-self:start;
}

.borrowerApplicationBrand{
  min-width:0;
  width:100%;
  max-width:300px;
  display:flex;
  align-items:center;
  justify-content:center;
  justify-self:center;
}

.borrowerApplicationBrand img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:104px;
  border-radius:16px;
  object-fit:contain;
  background:#ffffff;
  padding:0;
}

.borrowerApplicationMark{
  width:86px;
  height:86px;
  border-radius:22px;
  background:var(--borrower-brand-primary);
  color:#ffffff;
  display:grid;
  place-items:center;
  font-weight:900;
}

.borrowerSupportingDocumentsPanel{
  grid-column:1 / -1;
  margin-top:12px;
  padding:14px;
  border:1px solid #d8e2ee;
  border-radius:18px;
  background:#f8fbff;
}

.borrowerSupportingDocumentsPanel label{
  display:block;
  margin:0 0 8px;
  color:#0f172a;
  font-size:13px;
  font-weight:900;
}

.borrowerSupportingDocumentsCard{
  display:grid;
  gap:8px;
}

.borrowerSupportingDocumentsCard input[type="file"]{
  width:100%;
  min-height:46px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#ffffff;
  padding:10px;
  color:#0f172a;
  font-weight:800;
}

.borrowerSupportingDocumentsList{
  color:#475569;
  font-size:12px;
  line-height:1.45;
  font-weight:750;
  overflow-wrap:anywhere;
}

.borrowerSupportingDocumentsItems{
  display:grid;
  gap:8px;
}

.borrowerSupportingDocumentsItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  padding:8px 10px;
  border:1px solid #d8e2ee;
  border-radius:12px;
  background:#ffffff;
}

.borrowerSupportingDocumentsName{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.borrowerSupportingDocumentsRemove{
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  width:28px;
  height:28px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#ffffff;
  color:#7f1d1d;
  font-size:18px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
}

.borrowerSupportingDocumentsRemove:hover{
  border-color:#fca5a5;
  background:#fff1f2;
}

.borrowerSupportingDocumentsError{
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #fca5a5;
  border-radius:12px;
  background:#fff1f2;
  color:#991b1b;
  font-weight:850;
}

.borrowerCertificationPanel{
  grid-column:1 / -1;
  display:grid;
  gap:12px;
  margin-top:12px;
}

.borrowerCertificationBlock{
  border:1px solid #d8e2ee;
  border-radius:18px;
  background:#ffffff;
  padding:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.borrowerCertificationBlock h3{
  margin:0 0 8px;
  color:#0f172a;
  font-size:15px;
  line-height:1.25;
  font-weight:900;
}

.borrowerCertificationBlock p{
  margin:8px 0 0;
  color:#334155;
  font-size:13px;
  line-height:1.5;
  font-weight:650;
}

.borrowerCertificationCheck{
  display:grid;
  grid-template-columns:22px minmax(0, 1fr);
  gap:10px;
  align-items:start;
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#f8fbff;
  color:#0f172a;
  font-size:13px;
  line-height:1.4;
  cursor:pointer;
}

.borrowerCertificationCheck input{
  width:20px;
  height:20px;
  margin:0;
  accent-color:var(--borrower-brand-primary, #0b1f45);
}

.borrowerCertificationCheck span{
  min-width:0;
}

.borrowerApplicationKicker{
  color:var(--borrower-brand-accent);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.4px;
}

.borrowerApplicationHeader h1,
.borrowerApplicationIntro h2{
  margin:2px 0 0;
  color:#0f172a;
  font-size:28px;
  line-height:1.05;
  font-weight:900;
}

.borrowerApplicationSiteLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  flex:0 0 auto;
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--borrower-brand-accent) 45%, #cbd5e1);
  color:var(--borrower-brand-primary);
  background:#fff;
  text-decoration:none;
  font-weight:800;
  white-space:nowrap;
}

.borrowerApplicationIntro{
  padding:18px;
}

.borrowerApplicationIntro p{
  margin:8px 0 0;
  max-width:760px;
  color:#52657b;
  font-size:15px;
  line-height:1.55;
}

.borrower-public-wizard-host .wrap{
  max-width:1180px;
  padding:0 0 10px;
}

.lyndify-borrower-public-mode .steps button[data-public-hidden="true"]{
  display:none !important;
}

.lyndify-borrower-public-mode #step0 > .grid:first-child{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}

.lyndify-borrower-public-mode #step0 > .grid:first-child > div:empty{
  display:none !important;
}

.lyndify-borrower-public-mode .borrower-public-first-name{ order:1; }
.lyndify-borrower-public-mode .borrower-public-last-name{ order:2; }
.lyndify-borrower-public-mode .borrower-public-email{ order:3; }
.lyndify-borrower-public-mode .borrower-public-phone{ order:4; }

.borrowerSubmittedCard{
  display:grid;
  gap:12px;
  padding:18px;
  border:1px solid #bbf7d0;
  border-radius:18px;
  background:#f0fdf4;
  color:#14532d;
}

.borrowerSubmittedCard h2{
  margin:0;
  color:#0f172a;
  font-size:28px;
  line-height:1.1;
}

.borrowerSubmittedCard p{
  margin:0;
  color:#365044;
  line-height:1.55;
}

.borrowerSubmittedMeta{
  display:grid;
  gap:8px;
  padding:14px;
  border:1px solid #bbf7d0;
  border-radius:14px;
  background:#ffffff;
  color:#0f172a;
  font-weight:800;
}

.borrowerSubmittedRedirectNotice{
  margin-top:2px;
  padding:12px 14px;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:14px;
  font-weight:900;
}

.borrowerSubmittedPortalPrompt{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid #bfdbfe;
  border-radius:16px;
  background:#eff6ff;
  color:#0f172a;
}

.borrowerSubmittedPortalPrompt strong{
  display:block;
  color:#0b1f44;
  font-weight:950;
  margin-bottom:4px;
}

.borrowerSubmittedPortalPrompt span{
  display:block;
  color:#334155;
  line-height:1.5;
  font-weight:750;
}

.borrowerSubmittedActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.borrowerSubmittedStatusLink{
  justify-self:start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  background:#0b1f44;
  color:#fff;
  text-decoration:none;
  font-weight:900;
  box-shadow:0 12px 24px rgba(15,23,42,.16);
}

.borrowerSubmittedStatusLink:hover{
  background:#12366f;
}

.borrowerSubmittedSecondaryLink{
  justify-self:start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0b1f44;
  text-decoration:none;
  font-weight:900;
}

.borrowerSubmittedSecondaryLink:hover{
  border-color:#93c5fd;
  color:#1d4ed8;
}

.pageShell{
  max-width:none;
  margin:0 auto;
  padding:10px 14px 14px;
}

.wrap{
  max-width:none;
  margin:0 auto;
  padding:10px 14px 14px;
}

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

.card,
.panel,
.sectionCard{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:var(--shadow);
}

.card.form{
  min-height:0;
  padding:12px 18px 10px;
}

@media (min-width: 981px){
  main.submitDealPage #lyndify-root .card.form,
  main.submitDealPage .submit-deal-wizard-host .card.form{
    min-height:0 !important;
    height:auto !important;
    display:block !important;
    padding:14px 18px 10px !important;
  }

  main.submitDealPage #step0:not(.hidden){
    display:block !important;
    min-height:0 !important;
  }

  main.submitDealPage #step0 > .grid:first-child{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) !important;
    align-content:start !important;
    row-gap:12px !important;
    min-height:0 !important;
  }

  main.submitDealPage #step0 > .grid:first-child > div:empty{
    display:none !important;
  }

  main.submitDealPage #step0 input,
  main.submitDealPage #step0 select{
    min-height:48px !important;
  }

  main.submitDealPage #step0 .divider{
    margin:12px 0 !important;
  }

  main.submitDealPage #step0 .actions{
    margin-top:8px !important;
    justify-content:flex-end !important;
  }
}

@media (max-width: 900px){
  html:has(body > main.submitDealPage),
  body:has(> main.submitDealPage),
  body:has(main.submitDealPage){
    min-height:0 !important;
    height:auto !important;
    background:#ffffff !important;
  }

  main.submitDealPage,
  main.submitDealPage #lyndify-root,
  main.submitDealPage #lyndify-root > .wrap,
  main.submitDealPage .submit-deal-wizard-host,
  main.submitDealPage .submit-deal-wizard-host > .wrap,
  main.submitDealPage .card.form{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    margin-bottom:0 !important;
  }

  main.submitDealPage #lyndify-root > .wrap,
  main.submitDealPage .submit-deal-wizard-host > .wrap{
    padding-bottom:8px !important;
  }

  main.submitDealPage footer{
    margin-bottom:0 !important;
    padding-bottom:0 !important;
  }

  html:has(body > main.borrowerApplicationPage),
  body:has(> main.borrowerApplicationPage),
  body:has(main.borrowerApplicationPage){
    min-height:0 !important;
    height:auto !important;
    background:#ffffff !important;
  }

  main.borrowerApplicationPage,
  main.borrowerApplicationPage #lyndify-root,
  main.borrowerApplicationPage #lyndify-root > .wrap,
  main.borrowerApplicationPage .submit-deal-wizard-host,
  main.borrowerApplicationPage .submit-deal-wizard-host > .wrap,
  main.borrowerApplicationPage .card.form{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    margin-bottom:0 !important;
  }

  .borrowerApplicationPage{
    padding:10px 10px 12px;
  }

  .borrowerApplicationEmbed{
    padding:0;
  }

  .borrowerApplicationHeader,
  .borrowerApplicationIntro{
    border-radius:18px;
    margin-bottom:10px;
  }

  .borrowerApplicationHeader{
    grid-template-columns:minmax(0, 1fr) minmax(130px, 200px);
    align-items:center;
    justify-content:stretch;
    padding:14px;
    gap:12px;
    overflow:hidden;
  }

  .borrowerApplicationCompany{
    justify-self:start;
  }

  .borrowerApplicationBrand{
    justify-self:end;
    max-width:200px;
  }

  .borrowerApplicationBrand img{
    max-width:200px;
    max-height:86px;
    border-radius:12px;
  }

  .borrowerApplicationMark{
    width:70px;
    height:70px;
    border-radius:14px;
  }

  .borrowerApplicationHeader h1,
  .borrowerApplicationIntro h2{
    font-size:23px;
  }

  .borrowerApplicationSiteLink{
    display:none;
  }

  .borrowerApplicationIntro{
    padding:14px;
  }

  @media (max-width: 640px){
    .borrowerApplicationHeader{
      grid-template-columns:1fr;
      gap:12px;
      justify-items:center;
      text-align:center;
      padding:18px 16px;
      overflow:visible;
    }

    .borrowerApplicationCompany{
      justify-self:center;
      width:100%;
      text-align:center;
    }

    .borrowerApplicationBrand{
      justify-self:center;
      width:100%;
      max-width:min(72vw, 260px);
    }

    .borrowerApplicationBrand img{
      width:100%;
      max-width:min(72vw, 260px);
      max-height:150px;
      object-fit:contain;
    }
  }

  .lyndify-borrower-public-mode #step0 > .grid:first-child{
    grid-template-columns:1fr !important;
  }

  .borrower-public-wizard-host .wrap{
    padding-bottom:4px !important;
  }
}

.hero{
  background:linear-gradient(180deg,#ffffff 0%,#f5f8fb 100%);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px 18px 16px;
}

.heroRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.heroHeadline{
  margin:0;
  font-size:28px;
  line-height:1.05;
  font-weight:900;
  letter-spacing:-.02em;
}

.heroSub{
  margin:8px 0 0;
  color:#52657b;
  font-size:14px;
  line-height:1.55;
}

.heroEyebrow{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#1d4ed8;
  margin-bottom:8px;
}

.kpiGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}

.kpiCard{
  background:#f6f8fb;
  border:1px solid #dbe4ee;
  border-radius:16px;
  padding:12px 14px;
  min-width:0;
}

.kpiLabel{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748b;
  margin-bottom:6px;
}

.kpiValue{
  font-size:14px;
  line-height:1.45;
  font-weight:800;
  color:#0f172a;
  word-break:break-word;
}

.resultGrid{
  display:grid;
  grid-template-columns:minmax(0,1.75fr) minmax(300px,.95fr);
  gap:18px;
  align-items:start;
}

.sectionTitle{
  margin:0;
  font-size:22px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:-.02em;
}

.sectionSub{
  margin:6px 0 0;
  color:#64748b;
  font-size:14px;
  line-height:1.5;
}

.statusPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
}

.detailGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px 18px;
}

.detailLabel{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748b;
  margin-bottom:6px;
}

.detailValue{
  font-size:15px;
  line-height:1.5;
  font-weight:700;
  color:#0f172a;
}

.detailFull{
  grid-column:1 / -1;
}

.noteCard{
  margin-top:16px;
  background:#f8fafc;
  border:1px solid #dbe4ee;
  border-radius:16px;
  padding:14px 16px;
}

.formGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

label.fieldLabel{
  display:block;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748b;
  margin-bottom:8px;
}

input,
select,
textarea,
button{
  font:inherit;
}

input[type="text"],
input[type="number"],
select,
textarea,
.fieldInput{
  width:100%;
  border:1px solid #b9c8d9;
  background:#fff;
  color:#0f172a;
  border-radius:14px;
  padding:12px 14px;
  outline:none;
}

textarea{
  min-height:110px;
  resize:vertical;
}


button,
.btn{
  appearance:none;
  border:none;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
}

.btn.primary,
button.primary{
  background:var(--primary);
  color:#fff;
}

.btn.primary:hover,
button.primary:hover{
  background:var(--primary-600);
}

.btn.ghost,
button.ghost{
  background:#ffffff;
  color:#0f172a;
  border:1px solid #cfd9e5;
}

.btn.disabled,
button.disabled{
  background:#e2e8f0;
  color:#64748b;
  cursor:not-allowed;
}

.btn.small{
  padding:10px 14px;
  min-height:40px;
}

.actionStack{
  display:grid;
  gap:10px;
}

.feedbackSuccess{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:14px;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
  color:#166534;
  font-weight:800;
}

.feedbackError{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:14px;
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#be123c;
  font-weight:800;
}

.snapshotList{
  display:grid;
  gap:12px;
}

.snapshotRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding-bottom:10px;
  border-bottom:1px solid #edf2f7;
}

.snapshotKey{
  color:#64748b;
  font-weight:800;
}

.snapshotVal{
  color:#0f172a;
  font-weight:900;
  text-align:right;
}

.muted{
  color:#64748b;
}

.resultCount{
  font-size:12px;
  font-weight:900;
  color:#64748b;
}

/* ===== Public matching UI ===== */
.match-grid{
  display:grid;
  gap:14px;
}

.matchSection{
  display:grid;
  gap:10px;
}

.matchSectionHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.matchSectionToggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  cursor:pointer;
  text-align:left;
}

.matchSectionCaret{
  color:#64748b;
  font-size:16px;
  line-height:1;
  transition:transform .18s ease;
  flex:0 0 auto;
}

.matchSectionToggle[aria-expanded="false"] .matchSectionCaret{
  transform:rotate(-90deg);
}

.matchSectionBody[hidden]{
  display:none !important;
}

.matchSectionTitle{
  font-size:15px;
  font-weight:900;
  line-height:1.2;
  color:#111827;
}

.matchSectionCount{
  color:#6b7280;
  font-weight:800;
}

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

.lender{
  background:#ffffff;
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
  overflow:hidden;
}

.lCardGrid{
  display:grid;
  grid-template-columns:92px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  min-height:124px;
}

.lLogoWrap{
  width:92px;
  height:64px;
  border-radius:16px;
  border:1px solid #e2e8f0;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.lLogoWrap img{
  display:block;
  max-width:76px;
  max-height:34px;
  width:auto;
  height:auto;
  object-fit:contain;
  object-position:center;
}

.lIcon{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:none;
  border-radius:0;
  padding:6px;
}

.lIcon img{
  display:block;
  max-width:76px;
  max-height:34px;
  width:auto;
  height:auto;
  object-fit:contain;
  object-position:center;
}

.lMain{
  min-width:0;
  align-self:center;
}

.lNameRow{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.lname{
  font-size:15px;
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.01em;
  min-width:0;
}

.lMetaRow{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.scorePill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:32px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:900;
  font-size:12px;
  line-height:1;
  white-space:nowrap;
}

.scorePill.ok{
  background:#dcfce7;
  color:#166534;
  border-color:#86efac;
}
.scorePill.info{
  background:#dbeafe;
  color:#1d4ed8;
  border-color:#93c5fd;
}
.scorePill.warn{
  background:#ffedd5;
  color:#9a3412;
  border-color:#fdba74;
}

.reasoning{
  margin-top:12px;
  display:grid;
  gap:8px;
}

.reasoningItem{
  display:flex;
  align-items:flex-start;
  gap:9px;
  color:#334155;
  line-height:1.55;
  font-size:13px;
}

.reasoningDot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#cbd5e1;
  margin-top:6px;
  flex:0 0 auto;
}

.lActions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:150px;
  position:relative;
  z-index:3;
}

.lActions .lBtn{
  min-width:140px;
  position:relative;
  z-index:3;
  pointer-events:auto;
}

.helperText{
  color:#64748b;
  font-size:12px;
  line-height:1.5;
  text-align:right;
  max-width:220px;
}

.helperText.warn{
  color:#9a3412;
}

/* ---------- Tier visuals for live match cards ---------- */
.match-badge-best,
.match-badge-best_match{
  background:#dcfce7;
  color:#14532d;
  border-color:rgba(34,197,94,0.35);
}

.match-badge-great,
.match-badge-great_match,
.match-badge-strong_match{
  background:#dbeafe;
  color:#1e3a8a;
  border-color:rgba(59,130,246,0.35);
}

.match-badge-possible,
.match-badge-possible_match{
  background:#ffedd5;
  color:#9a3412;
  border-color:rgba(249,115,22,0.35);
}

/* ---------- Tier rail ---------- */
.lender-card{
  position:relative;
  border-left:10px solid transparent;
}

.lender--tier-best_match{ border-left-color:#22c55e; }
.lender--tier-great_match{ border-left-color:#3b82f6; }
.lender--tier-strong_match{ border-left-color:#3b82f6; }
.lender--tier-possible_match{ border-left-color:#f97316; }

/* ---------- Tier badge + card accent ---------- */
.tierBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-width:110px;
  min-height:40px;
  padding:8px 14px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  letter-spacing:.02em;
  line-height:1.05;
  border:1px solid rgba(15,23,42,0.14);
  box-shadow:none;
}

.tierBadge--best_match{
  background:#dcfce7;
  color:#14532d;
  border-color:rgba(34,197,94,0.42);
}
.tierBadge--great_match,
.tierBadge--strong_match{
  background:#dbeafe;
  color:#1e3a8a;
  border-color:rgba(59,130,246,0.42);
}
.tierBadge--possible_match{
  background:#ffedd5;
  color:#7c2d12;
  border-color:rgba(249,115,22,0.46);
}

.lender{
  border-left:10px solid transparent;
}
.lender.lender--tier-best_match{ border-left-color:#22c55e; }
.lender.lender--tier-great_match{ border-left-color:#3b82f6; }
.lender.lender--tier-strong_match{ border-left-color:#3b82f6; }
.lender.lender--tier-possible_match{ border-left-color:#f97316; }

.lender--disabled{
  opacity:0.75;
}

.lenderRequestNote{
  display:inline-flex;
  width:fit-content;
  max-width:100%;
  margin-top:10px;
  padding:8px 10px;
  border:1px solid #fed7aa;
  border-radius:12px;
  background:#fff7ed;
  color:#7c2d12;
  font-size:12px;
  font-weight:900;
  line-height:1.3;
}

@media (max-width: 900px){
  .pageShell,
  .wrap{
    padding:16px 12px 34px;
  }

  .hero{
    padding:18px 16px;
    border-radius:22px;
  }

  .heroHeadline{
    font-size:24px;
  }

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

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

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

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

  .lCardGrid{
    grid-template-columns:84px minmax(0,1fr);
    align-items:start;
  }

  .lLogoWrap{
    width:84px;
    height:64px;
    border-radius:16px;
  }

  .lLogoWrap img,
  .lIcon img{
    max-width:70px;
    max-height:32px;
  }

  .lActions{
    grid-column:1 / -1;
    width:100%;
    align-items:stretch;
    min-width:0;
  }

  .lActions .lBtn{
    width:100%;
    min-width:0;
  }

  .helperText{
    text-align:left;
    max-width:none;
  }
}

@media (max-width: 640px){
  .heroHeadline{
    font-size:22px;
  }

  .heroRow{
    align-items:flex-start;
  }

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

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

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

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

  .lCardGrid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .lLogoWrap{
    width:92px;
    height:64px;
  }

  .lMain{
    width:100%;
  }

  .lActions{
    width:100%;
  }
}


/* Match step stack fix */
#matchGrid{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
}

#matchGrid > .matchSection{
  width:100%;
}

#matchGrid > .matchSection .matchSectionGrid{
  grid-template-columns:1fr;
}

.quoteDocsPanel{
  width:100%;
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:#fff;
  padding:10px 12px 12px;
  box-shadow:0 8px 24px rgba(15,23,42,0.04);
}

.quoteDocsHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.quoteDocsHeader h3{
  margin:0;
  color:#0f172a;
  font-size:18px;
  line-height:1.15;
  font-weight:950;
}

.quoteDocsHeader p{
  margin:2px 0 0;
  color:#64748b;
  font-size:12px;
  line-height:1.3;
  max-width:740px;
}

.quoteDocsCount{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid #fcd34d;
  background:#fef3c7;
  color:#92400e;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}

.quoteDocsCount.is-green{
  border-color:#86efac;
  background:#dcfce7;
  color:#166534;
}

.quoteDocsGrid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,340px);
  gap:10px;
  align-items:start;
  margin-top:8px;
}

.quoteDocsList{
  display:grid;
  gap:8px;
  align-content:start;
  align-self:start;
}

.quoteDocsRow{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
  background:#f8fafc;
}

.quoteDocsMain{
  min-width:0;
}

.quoteDocsName{
  color:#0f172a;
  font-weight:950;
  text-decoration:none;
  overflow-wrap:anywhere;
}

.quoteDocsMeta{
  margin-top:5px;
  color:#64748b;
  font-size:12px;
  font-weight:750;
}

.quoteDocsPills{
  margin-top:7px;
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.quoteDocsPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:900;
}

.quoteDocsPill.is-blue{
  border-color:#93c5fd;
  background:#dbeafe;
  color:#1d4ed8;
}

.quoteDocsPill.is-green{
  border-color:#86efac;
  background:#dcfce7;
  color:#166534;
}

.quoteDocsPill.is-amber{
  border-color:#fcd34d;
  background:#fef3c7;
  color:#92400e;
}

.quoteDocsCrmNote{
  margin-top:6px;
  color:#64748b;
  font-size:12px;
  font-weight:750;
}

.quoteDocsControls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.quoteDocsControls label,
.quoteDocsForm label{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#334155;
  font-size:11px;
  font-weight:850;
}

.quoteDocsForm{
  display:grid;
  gap:5px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
  padding:8px 10px 10px;
}

.quoteDocsFormTitle{
  color:#0f172a;
  font-size:14px;
  font-weight:950;
}

.quoteDocsDropZone{
  display:grid;
  gap:2px;
  padding:6px 10px;
  border:2px dashed #bfdbfe;
  border-radius:14px;
  background:#eff6ff;
  text-align:center;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}

.quoteDocsDropZone.is-active{
  border-color:#2563eb;
  background:#dbeafe;
  transform:translateY(-1px);
}

.quoteDocsDropTitle{
  color:#0f172a;
  font-size:12px;
  font-weight:950;
  overflow-wrap:anywhere;
}

.quoteDocsDropHelp{
  color:#64748b;
  font-size:10px;
  font-weight:750;
  line-height:1.25;
}

.quoteDocsRemove{
  min-width:32px;
  min-height:32px;
  border:1px solid #fecaca;
  border-radius:999px;
  background:#fff1f2;
  color:#991b1b;
  font-size:18px;
  line-height:1;
  font-weight:950;
  cursor:pointer;
}

.quoteDocsRemove:disabled{
  opacity:.65;
  cursor:wait;
}

.quoteDocsClearFile{
  justify-self:start;
  min-height:32px;
  border:1px solid #fecaca;
  border-radius:999px;
  background:#fff1f2;
  color:#991b1b;
  padding:0 12px;
  font-size:12px;
  font-weight:950;
  cursor:pointer;
}

.quoteDocsForm input[type="file"],
.quoteDocsForm select,
.quoteDocsForm textarea{
  width:100%;
  min-height:30px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  padding:6px 9px;
  font:inherit;
  font-weight:800;
  box-sizing:border-box;
}

.quoteDocsForm textarea{
  resize:vertical;
  min-height:32px;
  font-weight:700;
}

.quoteDocsForm button{
  min-height:32px;
  border:1px solid #2563eb;
  border-radius:10px;
  background:#2563eb;
  color:#fff;
  font-weight:950;
  cursor:pointer;
}

@media (min-width: 901px){
  .quoteDocsForm{
    grid-template-columns:1fr 1fr;
  }

  .quoteDocsFormTitle,
  .quoteDocsDropZone,
  .quoteDocsForm textarea,
  .quoteDocsForm button,
  .quoteDocsMessage,
  .quoteDocsError{
    grid-column:1 / -1;
  }
}

.quoteDocsForm button:disabled{
  background:#93c5fd;
  cursor:wait;
}

.quoteDocsMessage{
  color:#166534;
  font-size:13px;
  font-weight:850;
}

.quoteDocsMessage.is-error,
.quoteDocsError{
  color:#991b1b;
  font-size:13px;
  font-weight:850;
}

.quoteDocsEmpty{
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:10px 12px;
  color:#64748b;
  font-weight:800;
}

@media (max-width: 900px){
  .quoteDocsGrid,
  .quoteDocsRow{
    grid-template-columns:1fr;
  }

  .quoteDocsControls{
    justify-content:flex-start;
  }
}

@media (max-width: 900px){
  html:has(body > main.submitDealPage),
  body:has(> main.submitDealPage),
  body:has(main.submitDealPage){
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    background:#eef3f8 !important;
    overflow-x:hidden !important;
  }

  main.submitDealPage{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    margin-bottom:0 !important;
    padding-bottom:0 !important;
    background:#eef3f8 !important;
    overflow-x:hidden !important;
  }

  main.submitDealPage > #lyndify-root,
  main.submitDealPage > #lyndify-root > .wrap,
  main.submitDealPage > .submit-deal-wizard-host,
  main.submitDealPage > .submit-deal-wizard-host > .wrap,
  main.submitDealPage .card.form{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    margin-bottom:0 !important;
    padding-bottom:0 !important;
  }

  main.submitDealPage footer{
    margin:6px 0 0 !important;
    padding:0 !important;
    min-height:0 !important;
    line-height:1.2 !important;
  }

  html:has(body > main.borrowerApplicationPage),
  body:has(> main.borrowerApplicationPage),
  body:has(main.borrowerApplicationPage){
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    background:#eef3f8 !important;
    overflow-x:hidden !important;
  }

  main.borrowerApplicationPage,
  main.borrowerApplicationPage > #lyndify-root,
  main.borrowerApplicationPage > #lyndify-root > .wrap,
  main.borrowerApplicationPage .borrower-public-wizard-host,
  main.borrowerApplicationPage .borrower-public-wizard-host > .wrap,
  main.borrowerApplicationPage .card.form{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    margin-bottom:0 !important;
  }

  main.borrowerApplicationPage .borrower-public-wizard-host > .wrap{
    padding-bottom:0 !important;
  }
}
