/* Targeted mobile fix: required controls must never sit under the action bar. */
@media(max-width:759px){
 html{scroll-padding-top:80px;scroll-padding-bottom:148px}
 body{padding-bottom:136px}
 #ap-form{padding-bottom:108px}
 #ap-form input,#ap-form select,#ap-form textarea{scroll-margin-top:80px;scroll-margin-bottom:148px}
 #ap-form .fx-nav{position:fixed;left:0;right:0;bottom:0;z-index:60;margin:0;padding:12px 16px;background:#fff;border-top:1px solid #c9d9ee;box-shadow:0 -4px 14px #0a254015;display:flex;flex-wrap:nowrap;gap:12px}
 #ap-form .fx-nav button{min-height:48px;flex:1}
}
.ap-tasks,.ap-return{padding:18px;border:1px solid #c9d9ee;border-radius:12px;background:#f4f8fc;margin:18px 0;color:#0a2540}
.ap-tasks h4{margin:0 0 10px}.ap-tasks li{margin:12px 0}.ap-tasks small{display:block;margin-top:4px;color:#4a5868}.ap-tasks a,.ap-return a{display:inline-block;min-height:44px;padding:10px 0;text-decoration:underline}.ap-tasks p{margin:8px 0 0}.ap-queue{font-weight:700;color:#0a2540}.ap-fi-retry{display:block;min-height:44px;cursor:pointer}
#ap-choose-statements{display:block;min-height:48px;margin:0 0 12px;background:#0a2540;color:#fff;border:0;cursor:pointer}
#ap-form .err[role=button]{cursor:pointer;text-decoration:underline;text-underline-offset:3px}
#ap-form .err[role=button]:focus-visible{outline:2px solid #1f5fa8;outline-offset:3px}
/* Amount card is light in tap-first flow; do not inherit the old dark-card white text. */
#ap-form .fld[data-f="funding.amountRequested"] .pre,#ap-form .fld[data-f="funding.amountRequested"] input{color:#0a2540}
#ap-form .fld[data-f="funding.amountRequested"] .err{color:#9b1c14}
#ap-form .fld[data-f="funding.amountRequested"] .inw{border-bottom-color:#6b7a89}
#ap-form .fld[data-f="funding.amountRequested"] .inw:focus-within{border-bottom-color:#1f5fa8;outline:2px solid #1f5fa8;outline-offset:2px;border-radius:4px}

/* One-column form after removing duplicate reassurance sidebar. */
.apg2{grid-template-columns:minmax(0,1fr);max-width:760px;margin-inline:auto}

/* Post-submit receipt: readable red next steps, followed immediately by the two actions. */
#ap-done{background:#fff}
#ap-done-h,#ap-done-next{color:#b42318;font-weight:800}
#ap-done-next{font-size:1.125rem;line-height:1.5;margin:10px 0 16px}
#ap-tasks{padding:0;border:0;border-radius:0;background:transparent;margin:0 0 20px}
#ap-tasks ul{list-style:none;padding:0;margin:0;display:grid;gap:12px}
#ap-tasks li{margin:0}
#ap-tasks a{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:52px;padding:14px 16px;border-radius:8px;background:#0a2540;color:#fff;font-weight:700;line-height:1.35;text-align:center;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-synthesis:none}
#ap-tasks a,#ap-tasks a *{font-weight:700;color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
#ap-tasks a:focus-visible{outline:3px solid #1f5fa8;outline-offset:3px}

@media(max-width:759px){#ap-form #f-funding-amountrequested{scroll-margin-bottom:400px}}

/* Short keyboard-sized viewports: keep the four contact controls in two compact
   rows, entirely inside the apply form; reserve a full action-bar safe area. */
@media(max-width:759px) and (max-height:600px){
 #ap-form{padding-bottom:164px;scroll-padding-bottom:100px}
 #ap-form #f-funding-amountrequested{scroll-margin-bottom:324px}
 #ap-form .fx-step[data-lead].on{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px;align-items:end}
 #ap-form .fx-step[data-lead]>*{grid-column:1/-1}
 #ap-form .fx-step[data-lead]>.row2{display:contents}
 #ap-form .fx-step[data-lead] .fld{margin-top:8px;min-width:0}
 #ap-form .fx-step[data-lead] .fld:not([data-f="funding.amountRequested"]):not([data-f="consent.callOptin"]){grid-column:auto}
 #ap-form .fx-step[data-lead] .fld[data-f="funding.amountRequested"]{padding:12px}
 #ap-form .fx-step[data-lead] .fld:not([data-f="funding.amountRequested"]) label{font-size:14px;line-height:1.35}
 #ap-form .fx-step[data-lead] .hint{font-size:13px;line-height:1.35;margin-top:3px;margin-bottom:6px}
 #ap-form .fx-step[data-lead] input,#ap-form .fx-step[data-lead] select{min-width:0;max-width:100%}
}

/* Receipt arrival has a named focus region, not a heading below the conversion lead. */
#ap-done-arrival{scroll-margin-top:96px}
@media(max-width:759px){#ap-done-arrival{scroll-margin-top:8px}}
/* At320 the lead and a full52pxaction must share one keyboard-free viewport. */
@media(max-width:320px){
 #ap-done-two-intro,#ap-done-two-list,#ap-done-two-note{font-size:14px;line-height:1.35}
 #ap-done-two-intro{margin:0 0 8px}
 #ap-done-two-list{margin:0 0 8px;padding-left:20px}
 #ap-done-two-list li{margin:0 0 5px}
 #ap-done-two-note{margin:0 0 8px}
 #ap-done-h{font-size:20px;line-height:1.2;margin:0 0 8px}
 #ap-done-next{font-size:14px;line-height:1.35;margin:0 0 10px}
}

#ap-form #f-business-industry-other{min-height:52px}

#cf-business-startdate-view{width:100%}
/* apply-intake-1111: email typo suggestion is a hint, not an error (no red, no icon, never blocks) */
#ap .ap-typo{margin:4px 0 0;font-size:14px;line-height:1.4;color:#111111}
#ap .ap-typo button{display:inline-flex;align-items:center;min-height:44px;padding:0;margin:0;border:0;background:none;font:inherit;font-weight:600;color:#0A2540;text-decoration:underline;text-underline-offset:2px;cursor:pointer;white-space:nowrap;word-break:normal;overflow-wrap:normal;text-align:left}
#ap .ap-typo-row{grid-column:1/-1;min-width:0}
#ap .ap-typo-s{display:inline-block;white-space:nowrap}
#ap .ap-typo button:focus-visible{outline:2px solid #0A2540;outline-offset:2px;border-radius:2px}
