/* Smartphone-only additions. Desktop and print retain their existing rules. */
.mobile-menu-toggle{display:none}
@media screen and (max-width:600px){
 html{-webkit-text-size-adjust:100%;scroll-padding-top:80px}body{min-width:0}body>main{width:100%;padding:0 16px 20px;min-width:0}main>section,.panel,.table-scroll{min-width:0;max-width:100%}
 body .app-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;min-height:64px;height:auto;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));align-items:center}
 .app-topbar>.topbar-wordmark{width:130px;max-width:100%;max-height:42px;transform:none;margin:0}
 .app-topbar .mobile-menu-toggle{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 10px;background:#ffffff10;color:#fff;border-color:#ffffff40;font-size:14px}
 .mobile-menu-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
 .app-topbar .topbar-actions{margin:0;gap:6px}.app-topbar .topbar-actions button{width:44px;height:44px;padding:10px}
 .app-topbar .customer-pages{display:none;grid-column:1/-1;order:initial;flex-basis:auto;overflow:visible;max-height:none;padding:6px 0 0;margin:0;gap:8px}
 .app-topbar.mobile-nav-open .customer-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:65dvh;overflow-y:auto}
 .app-topbar .customer-pages button{min-height:48px;min-width:0;width:100%;font-size:14px;line-height:1.35;padding:10px 7px;flex:initial}
 .account-context{padding:0 16px;margin-top:14px;font-size:12px;gap:6px;align-items:flex-start}.account-context small{width:100%;margin:2px 0 0 12px;font-size:12px;overflow-wrap:anywhere}
 h1{font-size:clamp(26px,7.4vw,34px);letter-spacing:-1px;overflow-wrap:anywhere}h2,h3{overflow-wrap:anywhere}.heading{width:100%;gap:14px}.heading>.primary{width:100%;min-height:48px;font-size:16px}
 button,input,select,textarea{touch-action:manipulation}input,select,textarea{font-size:16px!important;max-width:100%}button,summary{min-height:44px}button{font-size:15px}a,button,input,select,textarea,summary{-webkit-tap-highlight-color:#009ee325}
 #clientsPage #search{max-width:none;min-height:48px;font-size:16px}#clientsPage .client-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:28px}#clientsPage #clients button{padding:16px;gap:10px;min-height:126px;border-radius:14px}.client-tile-avatar{width:40px;height:40px;font-size:16px}.client-tile-name{font-size:15px;line-height:1.4}
 .customer-brand-tile{min-height:260px;margin-top:26px}.customer-brand-tile img{width:min(320px,100%)}.customer-evaluation>h2{font-size:25px}.evaluation-grid{grid-template-columns:1fr}.evaluation-card{padding:18px}
 .profile{display:grid;grid-template-columns:46px minmax(0,1fr);gap:12px;margin:22px 0}.profile h2{font-size:20px}.profile>button{grid-column:1/-1;width:100%;margin:0!important;min-height:44px}.profile .avatar{grid-column:1}.profile>.profile-info{min-width:0}
 .stats{grid-template-columns:1fr;gap:12px}.stats .stat{padding:18px}.stats .stat p{font-size:14px}.stats .stat h2{font-size:28px}.overview{grid-template-columns:1fr;gap:18px}.panel{padding:18px;border-radius:16px}.panel-title{align-items:flex-start;gap:12px}.panel-title h3{font-size:18px}.panel-title p,.muted{font-size:14px;line-height:1.5}.panel-title>button,.panel-title>select{width:100%;min-height:44px}
 .chart-layout{flex-direction:column;align-items:stretch;gap:18px;padding-top:18px}.donut{align-self:center;width:174px;height:174px}.donut>div{width:133px;height:133px}.donut strong{font-size:21px}.donut small{font-size:12px}#legend,.wealth-legend{width:100%}.legend-row{font-size:14px;gap:10px;flex-wrap:wrap}.legend-row>span{flex:1}.legend-row strong{max-width:100%;overflow-wrap:anywhere}.income-percent{font-size:12px}.chart-caption{font-size:12px}.wealth-summary{gap:18px;flex-direction:column;font-size:14px}.wealth-summary strong{font-size:24px}
 .mobile-card-table,.mobile-card-table tbody,.mobile-card-table tfoot{display:block;width:100%;min-width:0!important;white-space:normal}.mobile-card-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .mobile-card-table tr{display:grid;grid-template-columns:minmax(0,1fr);width:100%;border:1px solid #cbcdb980;border-radius:12px;margin:0 0 16px;overflow:visible;background:#fff}
 .mobile-card-table td,.mobile-card-table th{display:block!important;width:100%!important;min-width:0!important;max-width:100%;white-space:normal!important;text-align:left!important;font-size:16px!important;padding:12px!important;border-bottom:1px solid #cbcdb950;position:relative;overflow-wrap:anywhere}
 .mobile-card-table td::before{content:attr(data-mobile-label);display:block;font-size:12px;font-weight:600;letter-spacing:.4px;line-height:1.4;color:#58728b;margin:0 0 7px}.mobile-card-table td:last-child{border-bottom:0}
 .mobile-card-table td:first-child{border-radius:12px 12px 0 0;background:#f4f8fb;font-weight:700;font-size:18px!important}#rows td:first-child{padding-left:48px!important}.row-grip{width:36px;min-height:44px;left:5px}
 .mobile-card-table input:not([type=checkbox]),.mobile-card-table select,.mobile-card-table textarea{width:100%;min-height:46px;min-width:0;text-align:left;padding:10px}.mobile-card-table .amount-input{width:calc(100% - 25px)!important;text-align:right}.mobile-card-table td button{min-height:44px;padding:9px 12px;font-size:14px}.mobile-card-table .future-comparison{flex-wrap:wrap;justify-content:flex-start}.future-comparison .tariff-button{width:100%}.mobile-card-table .future-comparison .amount-input{flex:1}
 .mobile-card-table .provider-cell{padding-right:62px!important}.contract-details summary{right:10px;width:42px;height:44px;top:46px;transform:none}.contract-details[open] summary{top:46px}.contract-details label{font-size:14px}.expense-notes,.expense-notes[open]{min-width:0}.expense-notes summary{display:flex;width:max-content;align-items:center;max-width:100%;font-size:14px}.expense-notes textarea{width:100%;max-width:100%;font-size:16px}.expense-notes label{font-size:14px}.note-save-status{font-size:12px}
 .growth-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px}.growth-settings label{font-size:14px;min-width:0}.growth-settings input{width:100%;min-width:0}.growth-stats{grid-template-columns:1fr}.growth-stats span{font-size:14px}.growth-stats strong{font-size:26px}.growth-chart{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.growth-chart svg{min-width:520px}.growth-legend{font-size:14px;gap:12px}.review-panels{grid-template-columns:1fr}.review-panel a{font-size:14px;overflow-wrap:anywhere}.reference-panel p{font-size:16px}
 .event-options{grid-template-columns:1fr;gap:24px}.event-option{font-size:17px;min-height:48px}.event-option input[type=checkbox]{width:26px;height:26px;flex-basis:26px}.event-subtopics{font-size:15px}.interest-grid{grid-template-columns:1fr;gap:26px}.interest-card h2{font-size:21px}.interest-score input{width:80px;font-size:20px!important;min-height:48px}.benefit-grid{grid-template-columns:1fr;gap:20px}.benefit-tile h2{font-size:20px}.benefit-number{font-size:14px}
 dialog{width:calc(100vw - 24px);max-width:560px;max-height:calc(100dvh - 24px);padding:20px;overflow-y:auto;overscroll-behavior:contain}.dialog-head{gap:12px;position:sticky;top:-20px;background:white;z-index:2;padding:8px 0}.dialog-head h2{font-size:22px;line-height:1.3;margin:0}.dialog-head button{width:44px;flex-shrink:0}.field{font-size:15px}.field input,.field select{min-height:48px}.field textarea{width:100%}.dialog-note{font-size:14px}#form>.primary{min-height:48px}.income-row{flex-wrap:wrap;min-width:0}.income-row input{min-width:0}.tariff-consent,.legal-acknowledgement{font-size:14px;line-height:1.5}.tariff-consent input,.legal-acknowledgement input{flex-shrink:0}#toast{width:calc(100% - 32px);max-width:460px;bottom:max(18px,env(safe-area-inset-bottom));font-size:14px;z-index:100}
 #authScreen{display:flex;flex-direction:column;min-width:0}.auth-intro{padding:26px 24px 32px}.auth-intro .auth-brand{width:min(280px,100%);margin:0 auto 24px}.auth-intro h1{font-size:30px}.auth-intro p{font-size:16px;margin-top:14px}.auth-intro small{font-size:13px;margin-top:18px}.auth-content{padding:24px 16px 32px}.auth-card{padding:22px 18px;max-width:460px}.auth-card h2{font-size:27px}.auth-tabs button{font-size:15px;min-height:48px}.auth-card .eyebrow{font-size:12px}.auth-link{font-size:15px}.auth-card .field{margin:18px 0}.site-footer .legal-links{flex-wrap:wrap;justify-content:center}.site-footer .legal-links a{font-size:14px;padding:8px 12px;min-height:44px;display:flex;align-items:center}
}

@media screen and (max-width:600px){.income-source{grid-template-columns:minmax(0,1fr) 44px;gap:8px 10px;padding:10px 0;border-bottom:1px solid #cbcdb960}.income-source label{grid-column:1;min-width:0;font-size:14px}.income-source button{grid-column:2;grid-row:1/span 2;width:44px;margin:0;min-height:44px}.income-editor{padding:12px;min-width:0}.income-editor>button{font-size:14px;width:100%;min-height:44px}.legal-document{margin:24px 16px;padding:0;max-width:none;font-size:16px;overflow-wrap:anywhere}.legal-document h1{font-size:30px}.legal-document h2{font-size:22px}}
