/* HFHB Online Loan Application (1003)
   Layout: scroll-style application. Sticky section rail on the left (desktop) / sticky progress bar on top (mobile),
   one card per URLA section on the right. All styles are scoped to .hfhb so the WordPress theme is untouched.
   Brand colors are tokens — change them here or in Settings > Loan Application. */
.hfhb{
  --brand:#17375e;        /* deep navy: header, primary buttons, selected choices */
  --brand-2:#24507f;      /* hover */
  --tint:#e9f0f8;         /* selected-choice fill */
  --go:#1d7f55;           /* progress + completed sections */
  --go-tint:#e3f2ea;
  --paper:#ffffff;
  --bg:#f2f5f8;           /* blue-biased neutral ground */
  --line:#d5dce5;
  --text:#16212e;
  --muted:#586577;
  --bad:#b42318;
  --bad-tint:#fdecea;
  --focus:#2f7bc4;
  --f-body:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --f-head:"Source Serif 4",Georgia,"Times New Roman",serif;
  --r:10px;
  --sticky-top:0px;       /* raise this if your theme has a sticky header */
  font-family:var(--f-body);color:var(--text);font-size:16px;line-height:1.5;
  background:var(--bg);border-radius:var(--r);max-width:1180px;margin:0 auto;text-align:left;
  -webkit-font-smoothing:antialiased;
}
.hfhb *,.hfhb *::before,.hfhb *::after{box-sizing:border-box}
.hfhb [hidden]{display:none!important}
.hfhb h1,.hfhb h2,.hfhb h3{font-family:var(--f-head);color:var(--brand);margin:0;line-height:1.2;text-wrap:balance;font-weight:600;letter-spacing:0;text-transform:none}
.hfhb p{margin:0}
.hfhb a{color:var(--brand-2)}

/* ---------- Header ---------- */
.hfhb-top{background:var(--brand);color:#fff;border-radius:var(--r) var(--r) 0 0;padding:28px clamp(16px,4vw,40px) 26px;display:grid;gap:18px}
.hfhb-brandrow{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.hfhb-logo{height:52px;width:auto;background:#fff;border-radius:8px;padding:4px}
.hfhb-word{font-family:var(--f-head);font-size:20px;font-weight:600;color:#fff}
.hfhb-word small{display:block;font-family:var(--f-body);font-size:12px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;opacity:.75}
.hfhb-top h1{color:#fff;font-size:clamp(26px,3.6vw,38px)}
.hfhb-top .lede{max-width:62ch;color:#d9e4f1;font-size:17px}
.hfhb-trust{display:flex;flex-wrap:wrap;gap:8px 22px;font-size:14px;color:#d9e4f1}
.hfhb-trust span{display:inline-flex;align-items:center;gap:7px}
.hfhb-trust svg{width:16px;height:16px;flex:none;stroke:#8fd3b1}

/* ---------- Body layout ---------- */
.hfhb-body{display:grid;grid-template-columns:250px minmax(0,1fr);gap:32px;padding:28px clamp(16px,3vw,32px) 36px}
.hfhb-rail{position:sticky;top:calc(var(--sticky-top) + 16px);align-self:start;display:grid;gap:18px}
.hfhb-prog{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;display:grid;gap:8px}
.hfhb-prog .lbl-row{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.hfhb-prog .lbl-row b{color:var(--text)}
.hfhb-bar{height:8px;border-radius:99px;background:#e2e8ef;overflow:hidden}
.hfhb-bar i{display:block;height:100%;width:0;background:var(--go);border-radius:99px;transition:width .35s ease}
.hfhb-steps{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.hfhb-steps li{margin:0;padding:0}
.hfhb-steps a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:15px;line-height:1.3}
.hfhb-steps a:hover{background:#e7ecf2;color:var(--text)}
.hfhb-steps .dot{width:22px;height:22px;flex:none;border-radius:50%;border:2px solid #b9c4d1;display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;background:var(--paper)}
.hfhb-steps li.is-current a{color:var(--brand);font-weight:600;background:var(--paper)}
.hfhb-steps li.is-current .dot{border-color:var(--brand);color:var(--brand)}
.hfhb-steps li.is-done .dot{background:var(--go);border-color:var(--go);color:#fff}
.hfhb-steps li.is-done .dot::after{content:"";width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:translateY(-1px) rotate(-45deg)}
.hfhb-steps li.is-done .dot span{display:none}
.hfhb-help{font-size:14px;color:var(--muted);padding:0 10px}
.hfhb-help b{display:block;color:var(--text);font-size:15px}
.hfhb-mobilebar{display:none}

/* ---------- Sections ---------- */
.hfhb-main{display:grid;gap:22px;min-width:0}
.hfhb-sec{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:26px clamp(16px,3vw,32px) 24px;scroll-margin-top:calc(var(--sticky-top) + 20px)}
.hfhb-sec-h{display:flex;gap:14px;align-items:flex-start;margin-bottom:22px}
.hfhb-sec-n{flex:none;width:34px;height:34px;border-radius:50%;background:var(--tint);color:var(--brand);display:grid;place-items:center;font-weight:700;font-variant-numeric:tabular-nums}
.hfhb-sec-h h2{font-size:24px}
.hfhb-eyebrow{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:600;margin-bottom:3px}
.hfhb-sec-h p{color:var(--muted);margin-top:4px;max-width:62ch}

.hfhb-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px 16px}
.hfhb .f{grid-column:span 12;display:grid;gap:7px;align-content:start;min-width:0}
.hfhb .w-8{grid-column:span 8}.hfhb .w-6{grid-column:span 6}.hfhb .w-4{grid-column:span 4}.hfhb .w-3{grid-column:span 3}.hfhb .w-2{grid-column:span 2}
.hfhb .lbl{font-weight:600;font-size:15px;color:var(--text);line-height:1.35;display:block;margin:0}
.hfhb .opt{font-weight:400;color:var(--muted);font-size:13px}
.hfhb .hint{font-size:13.5px;color:var(--muted);line-height:1.4}
.hfhb .err{font-size:13.5px;color:var(--bad);font-weight:500;min-height:0}
.hfhb .err:empty{display:none}

.hfhb .sub{grid-column:span 12;padding-top:14px;border-top:1px solid var(--line);margin-top:4px;display:grid;gap:3px}
.hfhb .sub h3{font-size:19px}
.hfhb .sub p{color:var(--muted);font-size:14.5px}
.hfhb .sub.first{border-top:0;padding-top:0;margin-top:0}
.hfhb .note{grid-column:span 12;background:var(--tint);border-radius:8px;padding:12px 14px;font-size:14.5px;color:var(--text)}

/* inputs */
.hfhb input[type=text],.hfhb input[type=password],.hfhb input[type=email],.hfhb input[type=tel],.hfhb input[type=date],.hfhb input[type=month],.hfhb input[type=number],.hfhb select,.hfhb textarea{
  width:100%;max-width:100%;font:inherit;font-size:16px;color:var(--text);background:var(--paper);border:1.5px solid #c3ccd8;border-radius:8px;
  padding:11px 12px;min-height:46px;margin:0;box-shadow:none;outline:none;transition:border-color .15s, box-shadow .15s;appearance:auto;
}
.hfhb textarea{min-height:96px;resize:vertical}
.hfhb input:focus,.hfhb select:focus,.hfhb textarea:focus{border-color:var(--focus);box-shadow:0 0 0 3px rgba(47,123,196,.18)}
.hfhb input[readonly]{background:var(--bg);color:var(--muted)}
.hfhb .money{position:relative}
.hfhb .money::before{content:"$";position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.hfhb input[type=password]{letter-spacing:.3em}
.hfhb .money input{padding-left:26px;font-variant-numeric:tabular-nums}
.hfhb .f.bad input,.hfhb .f.bad select,.hfhb .f.bad textarea{border-color:var(--bad);background:var(--bad-tint)}

/* choice chips (radio + checkbox) */
.hfhb .chips{display:flex;flex-wrap:wrap;gap:8px}
.hfhb .chip{position:relative;display:block;margin:0;cursor:pointer}
.hfhb .chip input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.hfhb .chip span{display:flex;align-items:center;gap:9px;min-height:46px;padding:10px 15px;border:1.5px solid #c3ccd8;border-radius:8px;background:var(--paper);font-size:15px;line-height:1.3;transition:border-color .15s, background .15s;user-select:none}
.hfhb .chip span::before{content:"";flex:none;width:18px;height:18px;border:1.5px solid #9aa7b7;border-radius:50%;background:var(--paper);transition:all .15s}
.hfhb .chip input[type=checkbox]+span::before{border-radius:4px}
.hfhb .chip:hover span{border-color:var(--brand-2)}
.hfhb .chip input:checked+span{border-color:var(--brand);background:var(--tint);font-weight:600;color:var(--brand)}
.hfhb .chip input:checked+span::before{border-color:var(--brand);background:var(--brand);box-shadow:inset 0 0 0 3px var(--paper)}
.hfhb .chip input[type=checkbox]:checked+span::before{box-shadow:none;background:var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat}
.hfhb .chip input:focus-visible+span{outline:3px solid var(--focus);outline-offset:2px}
.hfhb .f.bad .chip span{border-color:#e3a39d}
.hfhb .chips.stack{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}

/* declaration rows */
.hfhb .f.row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 18px;padding:12px 0;border-bottom:1px solid #e6ebf1}
.hfhb .f.row .lbl{font-weight:500}
.hfhb .f.row .chips{flex-wrap:nowrap}
.hfhb .f.row .chip span{min-height:40px;padding:8px 14px}
.hfhb .f.row .err,.hfhb .f.row .hint{grid-column:1 / -1}

/* consent */
.hfhb .consent{display:flex;gap:12px;align-items:flex-start;cursor:pointer;font-size:14.5px;line-height:1.5;color:var(--text);background:var(--bg);border:1.5px solid var(--line);border-radius:8px;padding:14px;font-weight:400;margin:0}
.hfhb .consent input{width:20px;height:20px;flex:none;margin:2px 0 0;accent-color:var(--brand)}
.hfhb .f.bad .consent{border-color:var(--bad);background:var(--bad-tint)}

/* section footer + buttons */
.hfhb-sec-foot{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line);flex-wrap:wrap}
.hfhb-sec-foot .saved{margin-right:auto;font-size:13px;color:var(--muted)}
.hfhb button.hfhb-btn{font:inherit;font-weight:600;font-size:16px;line-height:1;border-radius:8px;padding:14px 22px;min-height:48px;cursor:pointer;border:1.5px solid var(--brand);background:var(--brand);color:#fff;text-transform:none;letter-spacing:0;box-shadow:none;display:inline-flex;align-items:center;gap:8px}
.hfhb button.hfhb-btn:hover{background:var(--brand-2);border-color:var(--brand-2)}
.hfhb button.hfhb-btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.hfhb button.hfhb-btn.ghost{background:transparent;color:var(--brand)}
.hfhb button.hfhb-btn.ghost:hover{background:var(--tint)}
.hfhb button.hfhb-btn.go{background:var(--go);border-color:var(--go);font-size:17px;padding:16px 28px}
.hfhb button.hfhb-btn.go:hover{filter:brightness(1.07)}
.hfhb button.hfhb-btn[disabled]{opacity:.6;cursor:progress}
.hfhb .linkbtn{background:none;border:0;padding:0;font:inherit;color:var(--brand-2);text-decoration:underline;cursor:pointer;font-size:14px}

/* review */
.hfhb .review{grid-column:span 12;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.hfhb .review-h{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;background:var(--bg);flex-wrap:wrap}
.hfhb .review-h b{font-size:15px}
.hfhb .review-body{padding:4px 16px 16px;max-height:520px;overflow:auto}
.hfhb .review-body h4{font-family:var(--f-head);color:var(--brand);font-size:16px;margin:16px 0 6px;display:flex;justify-content:space-between;gap:12px}
.hfhb .review-body h5{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:10px 0 4px}
.hfhb .review-body dl{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:4px 16px;margin:0;font-size:14px}
.hfhb .review-body dt{color:var(--muted)}
.hfhb .review-body dd{margin:0;font-weight:500;overflow-wrap:anywhere}

/* banners + footer */
.hfhb-banner{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:var(--go-tint);border:1px solid #b9dfca;border-radius:var(--r);padding:12px 16px;font-size:14.5px}
.hfhb-alert{background:var(--bad-tint);border:1px solid #f1b9b3;color:var(--bad);border-radius:8px;padding:12px 14px;font-size:14.5px;font-weight:500}
.hfhb-legal{padding:0 clamp(16px,3vw,32px) 28px;font-size:12.5px;color:var(--muted);display:grid;gap:8px;line-height:1.55}
.hfhb-legal .eho{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--text)}
.hfhb-legal .eho svg{width:22px;height:22px}
.hfhb .hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* success */
.hfhb-done{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:clamp(24px,5vw,48px);display:grid;gap:22px;max-width:760px;margin:0 auto}
.hfhb-done .badge{width:56px;height:56px;border-radius:50%;background:var(--go-tint);display:grid;place-items:center}
.hfhb-done .badge svg{width:30px;height:30px;stroke:var(--go)}
.hfhb-done h2{font-size:clamp(26px,3.4vw,34px)}
.hfhb-done .ref{font-variant-numeric:tabular-nums;font-weight:700;color:var(--text);background:var(--bg);padding:2px 8px;border-radius:6px}
.hfhb-done ol{margin:0;padding:0;list-style:none;display:grid;gap:14px;counter-reset:s}
.hfhb-done li{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;counter-increment:s}
.hfhb-done li::before{content:counter(s);width:30px;height:30px;border-radius:50%;background:var(--tint);color:var(--brand);font-weight:700;display:grid;place-items:center}
.hfhb-done li b{display:block}
.hfhb-done li span{color:var(--muted)}
.hfhb-done .actions{display:flex;flex-wrap:wrap;gap:12px}
.hfhb-done a.hfhb-btn{display:inline-flex;align-items:center;min-height:48px;padding:14px 22px;border-radius:8px;background:var(--brand);color:#fff;text-decoration:none;font-weight:600}
.hfhb-done a.hfhb-btn.ghost{background:transparent;color:var(--brand);border:1.5px solid var(--brand)}
.hfhb-demo{font-size:13.5px;background:#fff7e0;border:1px solid #f0d58a;border-radius:8px;padding:10px 12px;color:#5b4500}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .hfhb-body{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:0}
  .hfhb-rail{display:none}
  .hfhb-mobilebar{display:grid;gap:6px;position:sticky;top:var(--sticky-top);z-index:20;background:var(--bg);padding:12px 0 10px;margin:0;border-bottom:1px solid var(--line)}
  .hfhb-mobilebar .lbl-row{display:flex;justify-content:space-between;gap:12px;font-size:13.5px;color:var(--muted);font-variant-numeric:tabular-nums}
  .hfhb-mobilebar .lbl-row b{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media (max-width:640px){
  .hfhb .w-8,.hfhb .w-6,.hfhb .w-4{grid-column:span 12}
  .hfhb .w-3,.hfhb .w-2{grid-column:span 6}
  .hfhb .f.row{grid-template-columns:minmax(0,1fr)}
  .hfhb .chip{flex:1 1 auto}
  .hfhb .chips.stack{grid-template-columns:minmax(0,1fr)}
  .hfhb-sec-foot{justify-content:stretch}
  .hfhb-sec-foot .hfhb-btn{flex:1;justify-content:center}
  .hfhb .review-body dl{grid-template-columns:minmax(0,1fr)}
  .hfhb .review-body dd{margin-bottom:6px}
}
@media (prefers-reduced-motion:reduce){.hfhb *{transition:none!important;scroll-behavior:auto!important}}
