/* The document scrolls normally, including while the mobile keyboard is open. */
:root{--top:env(safe-area-inset-top,0px);--bottom:env(safe-area-inset-bottom,0px);--left:env(safe-area-inset-left,0px);--right:env(safe-area-inset-right,0px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
html{scroll-padding-block:calc(12px + var(--top)) calc(90px + var(--bottom))}
body{min-height:100vh;min-height:100dvh}
button,summary,select{touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #267bb4;outline-offset:2px}
.mobile main{min-height:100vh;min-height:100dvh;padding-bottom:calc(64px + var(--bottom))}
.mobile .mock{padding-bottom:var(--bottom);box-sizing:border-box}
.mobile .line,.mobile .box,.mobile .bar,.mobile .pad,.mobile .chart,.mobile .product,.mobile .invite,article{overflow-wrap:anywhere}
.mobile .box{flex-wrap:wrap;gap:9px}
.mobile .box>*{min-width:0;max-width:100%}
.mobile .terms button{flex:1 1 115px}
.mobile .full,.mobile .menu{height:auto;min-height:48px}
.mobile .bar{min-height:46px;height:auto}
.mobile .bar button{min-height:44px;min-width:34px}
.mobile .bar span{white-space:normal}
.mobile .bar>span:last-child{display:flex;align-items:center}
.mobile .cover button{max-width:100%;min-height:46px}
.mobile .cover strong{font-size:clamp(31px,10.55vw,44px)}
.mobile .sand center>div{font-size:clamp(29px,10vw,42px)!important}
.mobile .chart div{min-width:0}
.mobile .personal{min-height:calc(100dvh - 46px - 48px)}
.mobile .loan select,.mobile input,.mobile select{font-size:16px}
.mobile .invite button{min-height:36px}
.mobile .pad button{min-height:44px}
.mobile .pad .row b{max-width:100%}
.mobile .cover p{max-width:390px}
.mobile .cover button,.mobile .primary,.mobile .green{line-height:1.25}
.mobile dialog{max-width:calc(100vw - 32px);max-height:80dvh}
@media(max-width:900px),(pointer:coarse) and (max-width:1200px){
 body.mobile{background:white}
 .mobile main{width:100%;max-width:none;margin:0;padding-top:var(--top)}
 .mobile .bar,.mobile .pad,.mobile .personal,.mobile main>article{padding-left:max(15px,var(--left));padding-right:max(15px,var(--right))}
 .mobile .bar{padding-left:max(9px,var(--left));padding-right:max(9px,var(--right))}
 .mobile .mock{left:0;right:0;width:auto;transform:none;min-height:calc(42px + var(--bottom));display:flex;align-items:center;justify-content:center;line-height:1.35;padding:6px calc(55px + var(--right)) calc(6px + var(--bottom)) calc(10px + var(--left))}
 .mobile .float{left:auto;right:calc(8px + var(--right));bottom:calc(2px + var(--bottom));z-index:5;width:40px;height:39px;border-radius:10px;box-shadow:none;line-height:1.05}
 .mobile .cover{height:auto;min-height:clamp(450px,157vw,78svh);padding:28px max(20px,var(--right)) clamp(26px,5svh,54px) max(20px,var(--left));background-position:center 23%}
 .mobile .cover p{font-size:clamp(15px,4.5vw,18px);line-height:1.38}
 .mobile .invite{margin:clamp(18px,4svh,40px) max(14px,var(--right)) 36px max(14px,var(--left));font-size:13px;line-height:1.32}
 .mobile .product{margin-left:max(18px,var(--left));margin-right:max(18px,var(--right))}
 .mobile main>button:not(.float){margin-left:max(8px,var(--left))}
 .mobile .pad,.mobile .personal{padding-bottom:28px}
 .mobile .pad article{padding:16px}
 .mobile .terms{gap:5px}
 .mobile .terms button{margin:0}
 body:not(.mobile){padding:var(--top) var(--right) calc(20px + var(--bottom)) var(--left)}
 body:not(.mobile) header div{height:auto;min-height:64px;flex-wrap:wrap;padding-block:9px}
 header select,header button,input,select,textarea{font-size:16px}
 header select{min-width:0;max-width:55%}
 nav div{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:2px;overflow:visible;padding-block:5px}
 nav button{white-space:normal;margin:0;padding:9px 3px;min-height:44px;font-size:14px}
 .limits,.checks,#offer .limits{grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr))}
 .limits>*,.checks>*,.grid>*,.metrics>*{min-width:0}
 .row>*,.line>*{max-width:100%;overflow-wrap:anywhere}
 .row button,.search button,summary{min-height:44px}
 .search input{width:100%;min-width:0;flex-basis:100%}
 #offer{padding:14px}
 .funds{gap:6px}.funds article{padding:13px 16px;margin:0}
 .metrics{gap:7px}.metrics button{padding:12px}
 .mobile .bar button{font-size:15px}
}
@media(max-width:360px){
 .mobile .cover strong{font-size:31px}
 .mobile .cover p{margin:12px 0 19px}
 .mobile .bar button{padding:3px;font-size:13px;min-width:28px}
 .mobile .bar{font-size:14px}
 .mobile .invite{padding:12px;gap:8px}
 .mobile .pad article{padding:13px}
 .mobile .loan h2{font-size:25px;line-height:1.22}
 header .tag{display:none}
 header .logo{font-size:21px}
 header .logo svg{width:26px}
 header select{font-size:14px;padding:6px}
}
@media(orientation:landscape) and (max-height:540px){
 .mobile .cover{min-height:calc(100svh - 90px);background-position:center 26%;padding-block:24px}
 .mobile .cover strong{font-size:30px}
 .mobile .cover p{font-size:15px;margin:10px 0 18px}
 .mobile .cover{background-image:linear-gradient(90deg,#000a,transparent),url(portrait.jpg)}
 .mobile .cover p,.mobile .cover strong{max-width:46%}
}
@media(display-mode:standalone){html,body{overscroll-behavior-y:contain}}

.demoNotice{padding:10px 16px;text-align:center;background:#fff3cd;color:#503600;font:600 15px/1.5 system-ui}
.mobile .demoNotice{display:none}
.mobile .bar{flex-wrap:wrap;gap:4px;min-height:48px}
.mobile .bar>span{max-width:100%;white-space:normal}
.mobile .bar button{min-height:44px}
#bankNotes input{min-width:0;max-width:100%;font-size:16px}
#bankNoteStatus{overflow-wrap:anywhere;line-height:1.55}
@media(max-width:360px){body:not(.mobile) header .tag{display:inline-block}}

/* Keep demo disclosures visible without covering controls on short screens. */
.mobile .mock{padding-inline:max(10px,var(--left)) max(10px,var(--right));font-size:14px;line-height:1.4;padding-top:8px;padding-bottom:calc(8px + var(--bottom))}
.mobile .bar>span:last-child{flex-wrap:wrap}
.mobile .bar button,.mobile .terms button{min-width:44px;min-height:44px}
.mobile .pad button:focus-visible,.mobile .bar button:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #155f99;outline-offset:2px}
input,select,textarea,button{scroll-margin-block:14px}
@media(max-height:450px){
 .mobile main{display:flex;flex-direction:column;padding-bottom:var(--bottom)}
 .mobile .mock{position:static;order:-1;width:100%;transform:none;padding:7px 10px;min-height:0}
 .mobile main>dialog:not([open]){display:none}
}

.mobile .privacyHint{background:#eef5f2;color:#183c32;padding:12px 14px;line-height:1.55;border-radius:10px}
main:focus-visible{outline:2px solid #155f99;outline-offset:-2px}
@media(forced-colors:active){button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid Highlight}}

@media(min-height:451px){
 .mobile main{padding-bottom:max(calc(64px + var(--bottom)),calc(var(--demo-height,0px) + 14px))}
}
