/* Shared AIBE phone layout. Screen-only: desktop and PDF layouts retain their context. */
.aibe-mobile-legal,#aibe-mobile-footer{display:none}
@media screen and (max-width:767px){
 #thrive-header .tcb-logo{width:235px!important;max-width:100%!important}
 #thrive-header .tcb-logo img{width:100%!important;height:auto!important;max-height:58px;object-fit:contain}
 #thrive-header .symbol-section-in>.thrv-columns>.tcb-flex-row>.tcb-flex-col:first-child{flex:1 1 calc(100% - 64px)!important;max-width:calc(100% - 64px)!important}
 #thrive-header .symbol-section-in>.thrv-columns>.tcb-flex-row>.tcb-flex-col:last-child{flex:0 0 64px!important;max-width:64px!important}
 #aibe-global-header .aibe-logo{width:225px!important;max-width:calc(100% - 74px)}
 #aibe-global-header .aibe-header-inner{padding:12px 16px!important;gap:10px!important}
 #aibe-global-header .aibe-logo picture,#aibe-global-header .aibe-logo picture img{display:block;width:100%;height:auto}
 body.aibe-has-site-shell.valuation-tool>header,body.aibe-has-site-shell:has(.compact-footer)>header{display:none!important}
 .score-app .aibe-header-link img,.app>.topbar{display:none!important}
 html{scroll-padding-top:16px}
 body{max-width:100%;-webkit-text-size-adjust:100%}
 img,svg,iframe{max-width:100%}
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px!important;min-height:48px;max-width:100%;box-sizing:border-box}
 button,input[type=submit],summary{touch-action:manipulation}
 button,input[type=submit]{min-height:44px}
 #thrive-header,#aibe-global-header{position:static!important;inset:auto!important;transform:none!important;z-index:20!important;width:100%!important;max-width:100%!important}
 #thrive-header{height:auto!important;min-height:0!important;padding:0!important;margin:0!important;box-sizing:border-box!important}
 #thrive-header.tve-scroll-sticky{position:static!important}
 .tcb-style-wrap>.thrv_wrapper:empty:has(+#thrive-header){display:none!important}
 .tve-sticky-placeholder,.tve-sticky-spacer{display:none!important;height:0!important}
 #thrive-footer{display:none!important}
 #aibe-mobile-footer,.aibe-mobile-legal{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 20px;padding:12px 16px max(12px,env(safe-area-inset-bottom));margin:12px auto 0;color:#62736a;background:transparent;border:0;font:12px/1.6 Arial,sans-serif;text-align:center}
 #aibe-mobile-footer a,.aibe-mobile-legal a{display:inline-flex;align-items:center;min-height:44px;color:#193d35;text-underline-offset:3px}
 #aibe-mobile-footer small{flex-basis:100%;font-size:11px;letter-spacing:0;font-weight:400}
 #aibe-global-header .aibe-header-inner{padding:10px 16px;gap:8px}
 #aibe-global-header .aibe-logo{width:104px}
 #aibe-global-header .aibe-navigation>summary{padding:10px 0;min-height:44px;font-size:14px}
 #aibe-global-header .aibe-tool-links a{white-space:normal;min-height:44px}
 /* Valuation */
 body.valuation-tool>header{position:static!important;padding:16px;gap:0}
 body.valuation-tool>header .brand{width:min(280px,78vw)}
 body.valuation-tool>header #print,body.valuation-tool .notes{display:none!important}
 body.valuation-tool>footer{padding:12px 16px!important;margin-top:12px;gap:0}
 body.valuation-tool>footer>.brand,body.valuation-tool>footer>span{display:none}
 body.valuation-tool .legalFooter{display:flex;justify-content:center;flex-wrap:wrap;align-items:center;gap:10px;font-size:12px}
 body.valuation-tool .legalFooter a{min-height:44px;display:inline-flex;align-items:center}
 body.valuation-tool .mobileNav{position:static!important;box-shadow:none;backdrop-filter:none;margin:0 14px 14px;border:0;padding:0;background:transparent}
 body.valuation-tool .intro{padding-top:26px}
 body.valuation-tool .gateFine{font-size:12px!important}
 /* Loan */
 .compact-footer>.footer-brand,.compact-footer>p{display:none}
 .compact-footer{padding:4px 0!important;margin-top:12px}
 .compact-footer .aibe-mobile-legal{margin:0;padding-top:0}
 .metrics,.workspace,.panel,.input-card{min-width:0}
 .export-buttons{flex-wrap:wrap}
 .export-buttons button{flex:1 1 120px}
 /* Score */
 .score-app{padding:0 14px 20px!important;margin:4px auto!important}
 .score-card{padding:22px 18px!important;border-radius:12px!important}
 .score-result-disclaimer{display:none!important}
 .score-app .aibe-header-link{max-width:70%}
 .score-app .aibe-header-link img{max-width:100%;height:auto!important;max-height:40px}
 .score-app input{min-width:0!important}
 .score-app button{white-space:normal;line-height:1.4}
 /* Pencil Your Deal */
 .app{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));padding-bottom:20px}
 .topbar{justify-content:center;padding:16px 0 4px;gap:8px;margin-bottom:12px}
 .brand-logo{max-width:min(280px,82vw);height:auto;max-height:75px;box-sizing:border-box}
 .tagline-pill{display:none}
 .card{padding:22px 18px;border-radius:12px}
 .card:has(>.disclaimers){display:none}
 .footer-note{font-size:0;padding:8px 0}
 .footer-note a{font-size:13px;display:inline-flex;align-items:center;min-height:44px}
 #amort-modal>div,#portfolio-modal>div,#portfolio-viewer>div{width:calc(100% - 20px);max-width:calc(100% - 20px);margin:10px auto!important;max-height:calc(100dvh - 20px);overflow:auto}
 #aibeResourceGate{width:calc(100% - 28px)!important;max-width:480px!important;padding:22px 18px!important;border-radius:12px!important}
}
@media screen and (max-width:540px){
 .score-app [style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}
 .app .grid2,.app .stat-row,.app .wealth-grid,.app .ltv-compare{grid-template-columns:minmax(0,1fr)}
 .app .btn-primary,.app .btn-secondary{width:100%;min-height:48px}
 .app h1{font-size:30px;line-height:1.18}
 .app input,.app select{min-width:0}
}
