/* Keep intrinsic table/text sizes inside their cards, not the page. */
main,section,article,form,fieldset,.panel,.account,.category,.view,
.hero-copy,.hero-visual,.dash-main,.auth-story,.auth-card,
.top-grid>*,.middle-grid>*,.settings-grid>*,.accounts-grid>*,
.investment-layout>*,.investment-stats>*,.category-grid>*{min-width:0}
fieldset{min-inline-size:0}
input,select,textarea{min-width:0;max-width:100%}
.table-scroll{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.sidebar nav{min-width:0;max-width:100%}
.sidebar nav button{flex-shrink:0}
.panel-heading>div,.section-toolbar>label,header>div:first-child{min-width:0}
.header-actions,.close{flex-shrink:0}
.panel-heading,.section-toolbar,.income-row,.pagination{flex-wrap:wrap}
.panel,.account,.notice,.income-row,.investment-legend li,.auth-card{overflow-wrap:anywhere}
.wealth-actions{flex-wrap:wrap}
.wealth-svg,.investment-history,.investment-pie{max-width:100%;height:auto}
@media(max-width:800px){
 .top-grid,.middle-grid,.settings-grid,.investment-layout{grid-template-columns:minmax(0,1fr)}
 .accounts-grid,.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 header{gap:12px}header h1{overflow-wrap:anywhere}
 .section-toolbar>label,.filters label{max-width:100%;min-width:0}
 .allocation{flex-wrap:wrap}#allocation-legend{min-width:140px}
 .income-row>div{min-width:0;max-width:100%}
 .auth-layout{grid-template-columns:minmax(0,1fr)}
 .ambient{display:none}
 input,select,textarea{font-size:16px}
 .hero-visual{min-width:0;max-width:100%}
 .trust-row{flex-wrap:wrap}
 .bank-card{left:0;max-width:100%}.goal-card{right:0;max-width:100%}
 .site-header{height:auto;min-height:72px;gap:12px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}
 .site-header .header-cta{font-size:12px}
}
@media(max-width:430px){
 .accounts-grid{grid-template-columns:minmax(0,1fr)}
 .wealth>strong{font-size:clamp(25px,8vw,36px);letter-spacing:-1px;overflow-wrap:anywhere}
 .category strong{font-size:clamp(16px,5vw,20px);overflow-wrap:anywhere}
 .field-grid{grid-template-columns:minmax(0,1fr)}
 .auth-card{padding:22px 18px}.auth-story h1{font-size:clamp(32px,10vw,43px)}
 .panel-heading{align-items:flex-start}.panel-heading h2{overflow-wrap:anywhere}
}
