/* Shared responsive layout; the existing data, forms and table order stay authoritative. */
.responsive-menu,.responsive-filter-toggle,.responsive-menu-close{font:inherit;color:#285f85;background:#fff;border:1px solid #bccfdd;border-radius:4px;padding:10px 13px;min-height:44px;cursor:pointer}
.responsive-menu[hidden],.responsive-filter-toggle[hidden],#responsive-filters[hidden]{display:none!important}
.responsive-menu{flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border-color:transparent;background:transparent}
.responsive-menu:focus:not(:focus-visible){outline:none;box-shadow:none}
.site-login-short,.mobile-strategy{display:none}
.responsive-filter-toggle{margin:12px 0;width:100%;box-sizing:border-box;white-space:normal;line-height:1.5;text-align:left;font-weight:550}
html body dialog.responsive-navigation{position:fixed;inset:0 auto 0 0;margin:0;width:min(320px,calc(100vw - 32px));max-width:none;height:100dvh;max-height:100dvh;padding:12px 14px max(16px,env(safe-area-inset-bottom));border:0;border-radius:0;background:#193448;overflow:auto}
.responsive-navigation::backdrop{background:#102d43a8}
html body .responsive-navigation .site-sidebar{position:static;width:100%;height:auto;min-height:0;padding:20px 0 0}
.responsive-menu-close{display:block;margin-left:auto;background:#27475d;color:#fff;border-color:#7890a0}
.responsive-menu-open{overflow:hidden}
@media(max-width:1439px){
 html body.compact-bonds .filter-preview-v4.layout-matrix .screen-basic{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body.compact-bonds .screen-extra-grid,html body.compact-stocks .stock-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .screen-field,html body .screen-range,html body .screen-extra-group{min-width:0}
 html body .screen-field input,html body .screen-range input{min-width:0;max-width:100%}
 html body .compact-search-row{flex-wrap:wrap}
 html body .compact-search-row .search{min-width:0}
 html body .strategy-bar{flex-wrap:wrap}
 html body .viewbar{flex-wrap:wrap}
 html body .viewbar .tabs{flex-wrap:wrap}
}
@media(max-width:1199px){
 html.responsive-shell body{--nav:0px}
 html.responsive-shell body .main{margin-left:0;min-width:0;width:auto}
 html.responsive-shell .site-topline{padding:3px 16px;height:auto;min-height:50px;gap:12px}
 html.responsive-shell .site-topline .crumb{flex:1;flex-wrap:wrap;gap:5px 10px}
 html.responsive-shell .site-account-tools{gap:8px}
 html.responsive-shell .site-sidebar .navitem{min-height:44px}
 html body .stock-drawer{max-width:100vw}
 html body .drawer.expanded{max-width:100vw}
 html body .cabinet-overview-grid,html body .cabinet-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:899px){
 html body.compact-bonds .calculator-v2 .calculator-mode button,html body.compact-bonds .calculator-v2>button.primary{min-height:44px;white-space:normal;line-height:1.4}
 html body.compact-bonds .calculator-v2 .calc-inputs>label{display:flex;flex-direction:column;justify-content:space-between;gap:6px}
 html body.compact-bonds .calculator-v2 .calc-inputs input{box-sizing:border-box;min-height:44px;height:44px;font-size:16px}
 html body.compact-stocks .stock-screen .screen-range input,html body.compact-stocks .stock-screen select,html body.compact-bonds .screening-panel.filter-preview-v4 .screen-range label>input[data-number],html body.compact-bonds .screening-panel select,html body.compact-bonds .screen-multi>summary{min-height:44px;height:44px;font-size:16px;padding-block:8px}
 html body.compact-stocks .rank-settings,html body .screen-filter-foot button,html body .filter-preview-toggle{min-height:44px}
 html body.compact-stocks #tablewrap .stock-pinned-rank{position:static}
 html body .market-layout,html body .overview-layout,html body .holdings-layout,html body .rules-layout{grid-template-columns:minmax(0,1fr)}
 html body .portfolio-grid,html body .guest-preview-grid{grid-template-columns:minmax(0,1fr)}
 html body .guest-invitation{flex-direction:column;align-items:flex-start;gap:18px}
 html body .guest-settings{grid-template-columns:1fr}
 html body .watch-controls,html body .workspace-controls,html body .controls{flex-wrap:wrap}
 html body .watch-search{min-width:0;max-width:100%}
}
@media(max-width:599px){
 html body{min-width:0}
 html body .main,html body .workspace,html body #bond-app{min-width:0;max-width:100%}
 html body .workspace,html body.compact-stocks .workspace,html body.compact-bonds #bond-app{padding:16px 16px 24px}
 html body.compact-stocks .pagehead h1{font-size:24px;line-height:1.2}
 html body.compact-stocks .rank-settings{min-height:44px}
 html body .site-topline{padding-inline:8px;gap:8px}
 html body .site-topline .crumb{flex-wrap:nowrap;gap:8px;font-size:13px;min-width:0}
 html body .site-topline .crumb>.site-crumb-parent,html body .site-topline .crumb>.site-crumb-separator{display:none}
 html body .site-context-help{font-size:0;min-width:32px;min-height:44px;margin-left:auto}
 html body .site-context-help::after{content:'?';font-size:14px}
 html body .site-login-full{display:none}
 html body .site-login-short{display:inline}
 html body .site-account-tools{gap:6px}
 html body .mobile-strategy{display:grid;gap:7px;margin:0 12px 16px;font-size:13px;font-weight:550}
 html body .mobile-strategy select{width:100%;color:var(--text,#193b54);border:1px solid #bccfdd;border-radius:5px;background:#fff;padding:10px 12px}
 html body .mobile-strategy small{font-size:12px;color:var(--muted);font-weight:400}
 html body .mobile-strategy+.strategy-select{display:none}
 html body .holdings-main .section-head{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
 html body .holdings-main .section-head h2{font-size:20px}
 html body .holdings-table{table-layout:fixed;width:100%}
 html body .holdings-table th,html body .holdings-table td{padding:10px 4px}
 html body .holdings-table th:first-child{width:44%}
 html body .holdings-table th:nth-child(2){width:25%}
 html body .holdings-table th:nth-child(3){width:21%}
 html body .holdings-table th:last-child{width:10%;font-size:0}
 html body .holdings-table .company-link{min-width:0;max-width:100%;width:100%;text-align:left}
 html body .holdings-table .company-title,html body .holdings-table .company-link small{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45}
 html body .holdings-table .weight-track{display:none}
 html body .holdings-table .row-more{min-width:32px;width:32px;min-height:44px;padding:4px}
 html body .holdings-table th button{white-space:normal;text-align:left;font-size:11px;line-height:1.4}
 html body .holdings-table .rank-cell{gap:3px}
 html body .history-loading{padding:20px 16px;background:#fff;border:1px solid var(--line);border-radius:6px}
 html body .responsive-table-controls{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:end;gap:10px}
 html body .responsive-table-controls>label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;font-size:12px;gap:10px}
 html body .responsive-table-controls select,html body.compact-bonds .responsive-table-controls select,html body.compact-stocks .responsive-table-controls select{padding:10px 12px;height:44px;min-height:44px;font-size:16px}
 html body .site-account-name,html body .site-profile-icon{display:none}
 html body .site-topline #account-summary{padding-left:0;min-height:44px}
 html body .site-topline .notification-button{min-height:44px;gap:4px;padding:4px}
 html body .page-heading{padding:20px 12px 14px;flex-wrap:wrap;gap:10px}
 html body .page-heading h1{font-size:24px}
 html body .context-foot,html body .context-footer{margin-inline:12px;padding-inline:0}
 html body .compact-search-row{gap:12px}
 html body .compact-search-row .search,html body .screener-toolbar .search{width:100%;min-width:0;max-width:none;flex-basis:100%}
 html body .screener-toolbar,html body .screen-filter-foot,html body .screen-filter-actions,html body .screening-actions{flex-wrap:wrap;gap:10px}
 html body .screen-basic,html body.compact-bonds .filter-preview-v4.layout-matrix .screen-basic,html body.compact-stocks .stock-extra-grid,html body.compact-bonds .screen-extra-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 html body .screening-panel{padding:12px}
 html body .screening-panel .screen-field,html body .screening-panel .screen-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html body .screen-extra-group{min-width:0}
 html body .screen-extra-group .screen-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html body .screening-panel input,html body .screening-panel select{width:100%;min-width:0}
 html body.compact-bonds .screening-panel.filter-preview-v4 .screen-range label{height:auto;min-height:44px}
 html body.compact-bonds .screening-panel.filter-preview-v4 .screen-range label>input[data-number],html body.compact-stocks .stock-screen .screen-range input,html body.compact-bonds .screening-panel select,html body.compact-bonds .screen-multi>summary{min-height:44px;height:44px;font-size:16px;padding-block:8px}
 html body.compact-bonds .compact-search-row .search,html body.compact-stocks .search{min-height:44px;height:44px}
 html body.compact-bonds .compact-search-row .search input,html body.compact-stocks .search input{font-size:16px;min-height:0;height:100%;background:transparent;box-sizing:border-box}
 html body.compact-bonds .small-basis select{height:44px;min-height:44px;width:96px;font-size:16px}
 html body.compact-stocks .screener-toolbar{gap:8px}
 html body.compact-stocks .screener-toolbar .toolbar{gap:8px}
 html body input:not([type=checkbox]):not([type=radio]),html body select,html body textarea{font-size:16px;min-height:44px;max-width:100%}
 html body :is(.toolbar,.screener-toolbar,.table-actions,.screen-filter-foot,.bond-actions,.control-row,.watchlist-controls,.calendar-tools,.drawer-actions,.bond-card-actions,.sd-actions,.responsive-table-controls) button,html body .tabs button,html body .strategy-tab,html body .compact-presets-more>summary{min-height:44px}
 html body .tabs,html body .drawer-tabs,html body .drawer-tabbar,html body .strategy-bar{flex-wrap:wrap;gap:6px}
 html body .stock-sector-menu{width:min(285px,calc(100vw - 50px))}
 html body #tablewrap,html body .tablewrap,html body .table-wrap,html body .bond-table-wrap{width:100%;max-width:100%;margin-inline:0;overflow:auto;overscroll-behavior-x:contain}
 html body #tablewrap table,html body .tablewrap table{min-width:720px}
 html body #tablewrap th,html body #tablewrap td,html body .tablewrap th,html body .tablewrap td{position:static}
 html body .drawer,html body .stock-drawer,html body .drawer.expanded{width:100%;max-width:100vw;height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
 html body .drawer-head,html body .drawer-header{padding:16px 12px;gap:10px;flex-wrap:wrap}
 html body .drawer-body{padding:16px 12px;min-width:0}
 html body .drawer .metrics,html body .drawer .quote-grid,html body .drawer .bond-facts,html body .drawer .factor-matrix{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body dialog:not(.responsive-navigation){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:18px 14px;overflow:auto;overscroll-behavior:contain}
 html body dialog:has(.rank-form) .dialoghead{position:sticky;top:-18px;background:#fff;z-index:2;padding-block:10px;margin-top:-10px}
 html body dialog:has(.rank-form) .dialogfooter{position:sticky;bottom:-18px;background:#fff;padding-block:12px;margin-bottom:-12px;border-top:1px solid var(--line);z-index:2}
 html body dialog:has(.rank-form) .dialogfooter button{min-height:44px;width:100%}
 html body dialog:has(.rank-form) .rank-form{gap:0}
 html body dialog:has(.rank-form) .dialoghead .iconbtn{min-width:44px;min-height:44px;flex:none}
 html body dialog:has(.rank-form) .rank-option{grid-template-columns:minmax(0,1fr) 72px 14px;padding-block:0;gap:8px}
 html body dialog:has(.rank-form) :is(.rank-option label,label:has(#equalWeights)){display:flex;align-items:center;gap:8px;min-height:44px}
 html body dialog:has(.rank-form) input[type=checkbox]{width:18px;height:18px;flex:none}
 html body dialog:has(#equalWeights:checked) .rank-option{grid-template-columns:minmax(0,1fr)}
 html body dialog:has(#equalWeights:checked) .rank-option :is(input[type=number],span){display:none}
 html body .profile-picker,html body .strategy-select{margin-inline:12px;grid-template-columns:minmax(0,1fr)}
 html body .next-links,html body .research-grid,html body .composition-side,html body .performance-values{grid-template-columns:minmax(0,1fr)}
 html body .signal-head,html body .signal-row summary{grid-template-columns:minmax(0,1fr) minmax(0,.8fr) 32px 22px;gap:6px}
 html body .search-box,html body .search-area{width:100%;max-width:100%}
 html body .rules-grid>div{grid-template-columns:minmax(0,1fr);gap:5px}
 html body .guest-workspace{margin:0 12px 24px}
 html body .guest-invitation{padding:20px 16px}
 html body .guest-portfolio-content,html body .guest-sharing{flex-wrap:wrap;padding:20px 16px;gap:20px}
 html body .guest-panel-heading,html body .guest-panel-footer{flex-wrap:wrap;padding-inline:16px}
 html body .guest-asset-list{width:100%}
 html body .settings-layout{grid-template-columns:minmax(0,1fr)}
 html body .settings-nav{display:flex;flex-wrap:wrap}
 html body .watch-search{width:100%;flex-basis:100%}
 html body .security-chart{min-width:0;max-width:100%}
}

@media(max-width:1439px){
 html body.compact-bonds .filter-preview-v4 .filter-preview-matrix{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body.compact-bonds .filter-preview-v4 .screen-basic>.screen-range,html body.compact-bonds .filter-preview-v4 .screen-basic>.screen-select{grid-template-columns:minmax(0,1fr) minmax(0,1.18fr)}
}
@media(max-width:599px){
 html body.compact-bonds .bond-mode-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px}
 html body.compact-bonds .bond-mode-head nav{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;min-width:0}
 html body.compact-bonds .bond-mode-head nav button{min-height:44px;text-align:left;padding-block:10px;white-space:normal;line-height:1.4}
 html body.compact-bonds .bond-mode-head h1{font-size:24px;grid-column:1;grid-row:1}
 html body.compact-bonds .bond-mode-head .small-basis{grid-column:2;grid-row:1;justify-self:end;margin:0;gap:7px;font-size:12px}
 html body .bond-actions,html body .table-actions{flex-wrap:wrap;min-width:0;gap:8px}
 html body .top-scroll{min-width:0;max-width:100%}
 html body.compact-bonds .filter-preview-v4 .filter-preview-matrix{grid-template-columns:minmax(0,1fr)}
 html body.compact-bonds .filter-group:last-of-type>div{grid-template-columns:minmax(0,1fr);gap:12px}
 html body.compact-bonds .filter-preview-v4 .filter-preview-matrix .screen-range,html body.compact-bonds .filter-preview-v4 .filter-preview-matrix .screen-select{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html body.compact-bonds .compact-calendar{max-width:calc(100vw - 24px)}
 html body.compact-bonds #bond-drawer,html body.compact-stocks #drawer{width:100vw;max-width:100vw}
 html body .workspace-body{margin-inline:12px}
 html body .cabinet-quick-actions,html body .portfolio-heading-actions,html body .workspace-tabs,html body .analysis-tabs,html body .asset-tabs,html body .control-row .left{flex-wrap:wrap}
 html body .summary-grid,html body .analysis-grid,html body .cabinet-form-grid{grid-template-columns:minmax(0,1fr)}
 html body .cabinet-resume-body,html body .cabinet-panel-head,html body .portfolio-heading,html body .security-item{flex-wrap:wrap}
 html body .auth-card{padding:20px 16px;margin:24px 12px}
}

@media(max-width:599px){
 html body.compact-stocks #tablewrap .stock-pinned-rank,html body.compact-stocks #tablewrap th.stock-pinned-rank,
 html body.compact-stocks #tablewrap .companycol,html body.compact-stocks #tablewrap .checkcol,
 html body.compact-bonds #bond-table .companycol,html body.compact-bonds #bond-table .checkcol{position:static;box-shadow:none}
 html body.compact-stocks .viewbar.screener-toolbar{flex-wrap:wrap}
 html body.compact-bonds .compact-search-row .strategy-bar{flex-wrap:wrap}
 html body.compact-stocks .stock-filter-options{flex-wrap:wrap;gap:12px}
}

@media(max-width:599px){
 html body .table-scroll-controls{display:flex;flex-wrap:wrap;max-width:100%}
}

@media(max-width:599px){
 html body .table-navigation,html body .bond-scrollnav{flex-wrap:wrap;gap:8px;position:static}
 html body .table-jumps,html body .bond-scrollnav .jump{flex-wrap:wrap;flex-basis:100%;min-width:0;gap:6px}
 html body .table-scroll-controls{flex-basis:100%;flex-wrap:nowrap}
 html body .bond-scrollnav .hscroll{min-width:0}
 html body .table-scroll-controls .iconbtn,html body .bond-scrollnav .iconbtn{width:44px;flex-shrink:0}
 html body .anomaly-filters{flex-wrap:wrap;gap:12px}
 html body #shortlist-panel{max-width:100%;overflow-x:auto}
 html body.compact-bonds #bond-drawer.security-chart-expanded{width:100vw;max-width:100vw}
}

.responsive-table-controls[hidden],.responsive-row-details{display:none}
.responsive-table-controls{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:12px 0}
.responsive-table-controls label{display:grid;gap:4px;flex:1;min-width:0}
.responsive-table-controls select{width:100%;max-width:100%}
@media(max-width:1199px){
 html body .responsive-navigation .wordmark,html body .responsive-navigation .navitem span,html body .responsive-navigation .subtle{display:block}
}
@media(max-width:599px){
 html body .responsive-compact-table .table-navigation,html body .responsive-compact-table .bond-scrollnav{display:none}
 html body .responsive-compact-table #tablewrap table,html body .responsive-compact-table #bond-table table{display:block;min-width:0!important;width:100%;white-space:normal}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table colgroup,html body .responsive-compact-table :is(#tablewrap,#bond-table) table thead{display:none}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody{display:block}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody tr{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-bottom:1px solid var(--line);padding:8px 0;background:white}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody td{display:block;min-width:0;width:auto;max-width:none;height:auto;border:0;background:none;padding:6px 8px;text-align:left;white-space:normal}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-select{position:absolute;left:0;top:12px;padding:6px}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-select input{width:20px;height:20px}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-identity{grid-column:1 / -1;grid-row:1;padding-left:40px}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-priority,html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-secondary{grid-column:span 1}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-secondary{display:none;order:2}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-row-expanded .responsive-secondary{display:block}
 html body .responsive-compact-table .responsive-priority:before,html body .responsive-compact-table .responsive-secondary:before{content:attr(data-responsive-label);display:block;color:var(--muted);font-size:11px;margin-bottom:4px;line-height:1.35}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table tbody .responsive-row-details{display:block;order:3;grid-column:1 / -1;padding-block:0}
 html body .responsive-compact-table .responsive-row-details button{border:0;padding:0;color:var(--blue);background:none;min-height:44px}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table .company-label{max-width:none;white-space:normal}
 html body .responsive-compact-table :is(#tablewrap,#bond-table) table td.rankcol>.info{position:static;transform:none}
 html body.compact-stocks .responsive-compact-table .stock-target{align-items:flex-start;text-align:left;min-height:44px}
}

@media(max-width:899px){
 html body .calendar-layout{grid-template-columns:minmax(0,1fr)}
 html body .calendar-toolbar,html body .calendar-tools,html body .watchlist-controls{flex-wrap:wrap}
 html body .calendar-tools label{margin-left:0}
}
@media(max-width:599px){
 html body .sd-quotes>div:first-child{grid-column:1/-1}
 html body .sd-quotes,html body .sd-factor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 html body.compact-bonds #bond-drawer .quote-v4{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 0}
 html body.compact-bonds #bond-drawer .quote-v4>div:nth-child(3){grid-column:1/-1;padding-left:0;border-left:0}
 html body.compact-bonds #bond-drawer .quote-v4 small{white-space:normal}
 html body .calendar-grid,html body .calendar-weekdays{min-width:0}
 html body .calendar-layout>.cabinet-panel{overflow-x:auto}
 html body .calendar-legend{flex-wrap:wrap;gap:12px}
 html body .settings-fields{grid-template-columns:minmax(0,1fr)}
 html body .watchlist-controls label{flex-wrap:wrap;min-width:0}
 html body .watchlist-controls select{min-width:0;max-width:100%}
 html body .resume-metrics,html body .resume-footer{flex-wrap:wrap;gap:16px}
 html body #table-actions{flex-wrap:wrap;position:static}
}

.responsive-card-open{overflow:hidden;scrollbar-gutter:auto}
@media(max-width:899px){
 html body.compact-bonds #bond-drawer,html body.compact-bonds #bond-drawer.security-chart-expanded,html body.compact-stocks #drawer,html body.compact-stocks #drawer.security-chart-expanded{width:100vw;max-width:100vw}
}

.responsive-card-open [inert]{visibility:hidden}
@media(max-width:899px){
 html body .scenario-trajectory{width:100%;min-width:0!important;max-width:100%;overflow-x:auto}
}

@media(max-width:1439px){
 html body .capital-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .capital-overview section+section{border-left:0;padding-left:0}
 html body .t-toolbar,html body .capital-foot{flex-wrap:wrap}
}
@media(max-width:899px){
 html body .t-analysis-heading{flex-wrap:wrap}
 html body .t-overview,html body .t-two,html body .t-warnings{grid-template-columns:minmax(0,1fr)}
 html body .t-histogram{overflow-x:auto;max-width:100%}
 html body .t-chart-heading,html body .t-calendar-head,html body .t-chart-actions{flex-wrap:wrap}
}
@media(max-width:599px){
 html body .capital-overview{grid-template-columns:minmax(0,1fr)}
 html body .capital-overview section+section{border-top:1px solid var(--line);padding-top:16px}
 html body .capital-payments{min-height:220px}
 html body .capital-foot{gap:12px}
 html body .t-toolbar input{width:100%;flex-basis:100%}
 html body .t-toolbar-spacer{display:none}
 html body .t-weight-tools{width:auto}
 html body .t-toolbar button,html body .t-tabs button{min-height:44px}
 html body .t-tabs{height:auto;min-width:0;max-width:100%}
 html body .t-scroll-grid{display:none}
 html body .t-table-viewport{overflow:auto;max-width:100%}
 html body .t-table-blocks{min-width:720px;grid-template-columns:190px minmax(380px,1fr) 148px}
 html body .t-securities td{height:58px}
 html body .t-factor{grid-template-columns:minmax(0,1fr) 60px 36px;gap:8px}
 html body .t-factor small{grid-column:1/-1}
 html body .t-analysis .analysis-card{min-width:0;overflow:auto}
 html body .t-chart-scale{width:60px}
 html body .t-dialog-body{padding:12px}
}

@media(max-width:1439px){
 html body.compact-bonds .scenario-preview .scenario-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:0}
}
@media(max-width:599px){
 html body.compact-bonds .scenario-preview .scenario-controls{grid-template-columns:minmax(0,1fr)}
 html body.compact-bonds .scenario-trajectory{grid-column:auto;min-width:0}
 html body.compact-bonds .scenario-end-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html body.compact-bonds .scenario-panel-title,html body.compact-bonds .scenario-dates-head,html body.compact-bonds .scenario-runbar{flex-wrap:wrap;gap:12px}
 html body.compact-bonds .scenario-preview .scenario-controls input,html body.compact-bonds .scenario-preview .scenario-controls select{height:44px;font-size:16px}
}

@media(max-width:1439px){
 html body.compact-bonds .scenario-search-row,html body.compact-bonds .scenario-search-row .strategy-bar{flex-wrap:wrap}
}
@media(max-width:599px){
 html body.compact-bonds .scenario-search-row>.search{flex-basis:100%;min-width:0}
 html body.compact-bonds .scenario-search-row .strategy-bar{margin-left:0}
 html body.compact-bonds .scenario-preview .scenario-cash-grid>label{flex-wrap:wrap;width:100%;min-width:0}
 html body.compact-bonds .scenario-preview .scenario-cash-grid select{width:100%;min-width:0}
 html body.compact-bonds .scenario-run-instructions{flex-wrap:wrap}
}

/* Scoped components load this sheet after their own desktop rules. */
@media(max-width:899px){
 html.workspace-overlay-document body .drawer{width:100vw!important;max-width:100vw!important}
}
@media(max-width:599px){
 html body .portfolio-heading label{min-width:0;max-width:100%;flex-wrap:wrap}
 html body .portfolio-heading select{min-width:0;max-width:100%}
 html.workspace-embed.personal-watch :is(#tablewrap,#bond-table) :is(th,td){position:static!important}
 html.workspace-embed.personal-watch .personal-bar .toolbar{flex-wrap:wrap;min-width:0}
 html.workspace-embed .screen-basic{grid-template-columns:minmax(0,1fr)}
}

@media(max-width:599px){
 html body .company-page .issuer-quote{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:16px}
 html body .company-page .issuer-quote>.metric:first-child{grid-column:1/-1}
}

@media(max-width:599px){
 html body.compact-bonds .compact-search-row .strategy-bar{flex-basis:100%;justify-content:flex-start}
}

/* Phone forms keep full-width ranges; labels do not compete with numeric input. */
@media(max-width:599px){
 html body.compact-bonds .filter-preview-v4 .screen-basic>.screen-range,
 html body.compact-bonds .filter-preview-v4 .screen-basic>.screen-select,
 html body.compact-bonds .filter-preview-v4 .filter-preview-matrix .screen-range,
 html body.compact-bonds .filter-preview-v4 .filter-preview-matrix .screen-select,
 html body.compact-stocks .stock-screen .screen-range,
 html body.compact-stocks .stock-screen .screen-field{grid-template-columns:minmax(0,1fr);gap:7px}
 html body.compact-bonds .filter-preview-v4.layout-matrix .screen-basic{padding:4px;gap:18px}
 html body.compact-bonds .filter-preview-v4 .screen-range>span,
 html body.compact-bonds .filter-preview-v4 .screen-select>span,
 html body.compact-stocks .stock-screen .screen-range>span{font-size:13px;line-height:1.4}
 html body.compact-bonds .filter-preview-v4 .screen-range>div{width:100%;max-width:none}
 html body.compact-bonds .filter-preview-v4 .screen-range label small{font-size:11px}
 html body.compact-stocks .screener-toolbar{margin-block:8px 12px}
 html body .responsive-filter-toggle{margin:4px 0 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-color:#c7d5df;background:#fff}
 html body .responsive-filter-toggle::after{content:'+';font-size:22px;line-height:1;font-weight:400}
 html body .responsive-filter-toggle[aria-expanded=true]::after{content:'−'}
 html body .screen-filter-foot{padding:12px;gap:10px}
 html body .screen-filter-foot>.filter-summary,html body .screen-filter-foot>span{flex-basis:100%}
 html body .screen-filter-foot>button{flex:1;min-height:44px}
}

@media(max-width:599px){
 html body.compact-bonds .screener-toolbar .inline-help{display:inline-grid;place-items:center;vertical-align:middle;width:24px;height:24px;min-height:24px;padding:0;border-radius:50%;font-size:12px;line-height:1}
}

/* Results lead on smaller screens; secondary actions stay in one disclosure. */
.responsive-tools{display:block;margin-left:auto;min-width:0}
.responsive-tools>summary[hidden],.responsive-layout-toggle[hidden]{display:none!important}
@media(max-width:1439px){
 html body.compact-bonds .compact-search-row{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:8px 16px;align-items:center}
 html body.compact-bonds .compact-search-row .search{width:100%;min-width:0;max-width:none}
 html body.compact-bonds .compact-search-row .bond-search-scope{white-space:normal;line-height:1.4}
 html body.compact-bonds .compact-search-row .strategy-bar{grid-column:1/-1;justify-content:flex-start;flex-basis:auto}
 html body .responsive-filter-toggle{display:flex;align-items:center;justify-content:space-between;margin:8px 0 14px;border-color:#d2dce4;color:#24485e;font-size:13px}
 html body .responsive-filter-toggle::after{content:'+';font-size:22px;font-weight:400;line-height:1}
 html body .responsive-filter-toggle[aria-expanded=true]::after{content:'−'}
}
@media(max-width:899px){
 html body .responsive-tools{display:block;position:relative;margin-left:auto;min-width:0}
 html body .responsive-tools>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 10px;list-style:none;font-size:13px;color:#31536c;cursor:pointer;border:1px solid #dce5ed;border-radius:5px;background:#fff}
 html body .responsive-tools>summary::-webkit-details-marker{display:none}
 html body .responsive-tools>summary::after{content:'⌄';font-size:16px}
 html body .responsive-tools[open]>summary::after{content:'⌃'}
 html body .responsive-tools[open]{flex-basis:100%}
 html body .responsive-tools[open]>summary{background:#f5f7f9}
 html body .responsive-tools .bond-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0 0;padding:8px;border:1px solid #e1e7ec;border-radius:5px}
 html body .responsive-tools .bond-actions>button,html body .responsive-tools .compact-views>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px;font-size:13px;white-space:normal;text-align:left;border:0;background:#fff}
 html body .responsive-tools .responsive-layout-toggle{grid-column:1/-1}
 html body .screening-panel :is(input:not([type=checkbox]),select),html body .screening-panel .screen-multi>summary{min-height:44px;height:44px;font-size:16px}
 html body .screen-filter-foot>button{min-height:44px}
}
@media(max-width:599px){
 html body.compact-bonds .compact-search-row{grid-template-columns:minmax(0,1fr);gap:8px}
 html body.compact-bonds .compact-search-row .bond-search-scope{min-height:36px;display:flex;align-items:center}
 html body.compact-bonds .compact-search-row .strategy-bar{gap:2px}
 html body.compact-bonds .strategy-bar>button{padding-inline:7px;font-size:12px}
 html body.compact-bonds .compact-presets-more>summary{padding-inline:7px;font-size:12px}
 html body.compact-stocks .viewbar.screener-toolbar{align-items:center;gap:8px}
 html body.compact-stocks .viewbar.screener-toolbar>.tabs{gap:14px}
 html body .responsive-table-controls{margin:10px 0 12px}
}

/* Full-screen paper preview: a stable edge and comfortable touch controls. */
@media(max-width:899px){
 html body.compact-stocks #drawer.sd-drawer .drawer-close,
 html body.compact-bonds #bond-drawer .drawer-close{width:44px;height:44px;min-height:44px;top:4px;right:8px;padding:12px}
 html body.compact-stocks #drawer.sd-drawer>.personal-star{min-height:44px}
 html body.compact-bonds #bond-drawer>.personal-star{top:4px;right:58px;height:44px;min-height:44px}
 html body.compact-stocks #drawer.sd-drawer .drawer-actions button,
 html body.compact-bonds #bond-drawer .bond-card-actions :is(button,a){min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 html body.compact-stocks #drawer.sd-drawer .security-chart-tabs button,
 html body.compact-bonds #bond-drawer .bond-card-tabs button{min-height:44px}
 html body.compact-stocks #drawer.sd-drawer .sd-periods button{min-height:44px;padding-inline:12px;font-size:12px}
 html body.compact-stocks #drawer.sd-drawer .sd-disclosure{min-height:44px}
 html body.compact-stocks #drawer.sd-drawer .sd-factor-help{width:24px;height:24px;min-height:24px;padding:4px}
 html body.compact-stocks #drawer.sd-drawer .sd-factor-label{padding-right:26px;min-height:24px}
}
@media(max-width:599px){
 html body.compact-stocks #drawer.sd-drawer .drawerhead{padding-inline:16px}
 html body.compact-stocks #drawer.sd-drawer .sd-company-icon{left:16px}
 html body.compact-stocks #drawer.sd-drawer .drawerbody{padding:16px 16px max(22px,env(safe-area-inset-bottom));scrollbar-gutter:auto}
 html body.compact-bonds #bond-drawer .bond-card-head{padding:48px 16px 0}
 html body.compact-bonds #bond-drawer .bond-card-head h2{margin-right:0}
 html body.compact-bonds #bond-drawer .bond-card-body{padding:16px 16px max(22px,env(safe-area-inset-bottom));scrollbar-gutter:auto}
 html body.compact-bonds #bond-drawer .bond-passport{grid-template-columns:minmax(0,1fr);gap:12px}
 html body.compact-bonds #bond-drawer .bond-passport dt{font-size:12px}
 html body.compact-bonds #bond-drawer .bond-passport dd{font-size:13px}
 html body.compact-stocks #drawer.sd-drawer .ratio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Account forms use the full reading width below the sidebar breakpoint. */
@media(max-width:899px){
 html body #cabinet-settings{grid-template-columns:minmax(0,1fr);gap:16px}
 html body .cabinet-settings-nav{display:flex;gap:4px;overflow-x:auto;max-width:100%;padding-bottom:4px;scrollbar-width:thin}
 html body .cabinet-settings-nav button{flex:0 0 auto;width:auto;min-height:44px;margin:0;padding:10px 12px;white-space:nowrap;font-size:13px}
 html body #cabinet-settings-content,html body #cabinet-security{padding:22px}
 html body .settings-field{font-size:13px;line-height:1.45}
 html body .settings-field :is(input,select){font-size:16px;min-height:44px;min-width:0}
 html body .settings-form-actions{flex-wrap:wrap;gap:12px}
 html body .settings-form-actions button,html body .security-item button{min-height:44px}
 html body .profile-identity .cabinet-avatar{flex:none}
}
@media(max-width:599px){
 html body #cabinet-settings-content,html body #cabinet-security{padding:20px 16px}
 html body .profile-email{flex-wrap:wrap;gap:8px}
 html body .profile-email input{flex-basis:100%}
 html body .settings-form-actions button{width:100%}
 html body .settings-form-actions small{font-size:12px}
 html body .notification-option{gap:16px}
 html body .notification-option input{flex:none;width:20px;height:20px}
 html body .portfolio-card{padding:16px}
 html body .portfolio-card-top{margin-bottom:10px}
 html body .portfolio-card-top button,html body .portfolio-card-actions button,html body .cabinet-quick-actions button{min-height:44px}
 html body .portfolio-card h2{font-size:17px;line-height:1.4}
 html body .portfolio-budget{margin:14px 0 5px}
 html body .portfolio-card-actions{margin-top:14px;flex-wrap:wrap}
 html body .portfolio-new{min-height:140px}
 html body .cabinet-dialog header button{width:44px;min-width:44px;height:44px}
 html body .cabinet-dialog-actions{flex-wrap:wrap}
 html body .cabinet-dialog-actions button{min-height:44px;flex:1}
}

@media(max-width:599px){
 html body.compact-bonds .screener-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;align-items:center}
 html body.compact-bonds .screener-toolbar #bond-count{grid-column:1;grid-row:1;font-size:13px;line-height:1.5}
 html body.compact-bonds .screener-toolbar .compact-snapshot{grid-column:1;grid-row:2;justify-self:start;min-height:32px;padding:0;text-align:left}
 html body.compact-bonds .screener-toolbar #bond-selected:empty{display:none}
 html body.compact-bonds .screener-toolbar #bond-selected:not(:empty){grid-column:1/-1}
 html body.compact-bonds .screener-toolbar .responsive-tools{grid-column:2;grid-row:1/3}
 html body.compact-bonds .screener-toolbar .responsive-tools[open]{grid-column:1/-1;grid-row:auto;width:100%;margin-top:8px}
}

/* A complete month fits the phone; daily detail retains every event and amount. */
.calendar-day-open{display:none}
@media(max-width:599px){
 html body .calendar-toolbar{gap:14px;margin-bottom:16px}
 html body .calendar-month{width:100%;justify-content:space-between;gap:8px}
 html body .calendar-month h2{font-size:19px}
 html body .calendar-tools{display:grid;grid-template-columns:44px minmax(90px,1fr) 44px;width:100%;gap:6px}
 html body .calendar-tools button{min-height:44px;font-size:14px}
 html body .calendar-tools label{grid-column:1/-1;margin:4px 0 0}
 html body .calendar-tools select{width:100%;max-width:none;font-size:16px}
 html body .calendar-weekdays span{padding:10px 0;text-align:center;font-size:12px}
 html body .calendar-day{position:relative;min-height:64px;padding:0}
 html body .calendar-day>time{margin:8px auto 0;font-size:12px}
 html body .calendar-day:has(.calendar-day-open)>time,html body .calendar-day>.calendar-chip,html body .calendar-day>.calendar-more{display:none}
 html body .calendar-day-open{display:flex;flex-direction:column;align-items:center;gap:3px;width:100%;height:100%;min-height:64px;padding:8px 0 5px;border:0;border-radius:0;background:#f3f7fa;color:#244b65}
 html body .calendar-day-open>span{display:block;width:23px;height:23px;line-height:23px;font-size:12px}
 html body .calendar-day.today .calendar-day-open>span{border-radius:50%;background:#285f85;color:#fff}
 html body .calendar-day-open>small{min-width:18px;padding:1px 4px;border-radius:8px;background:#e1ebf2;color:#244b65;font-size:10px;font-weight:600;line-height:14px}
 html body .calendar-day-open:focus-visible{position:relative;z-index:1;outline:2px solid #285f85;outline-offset:-2px}
 html body .calendar-legend{gap:10px 16px;padding:12px;font-size:11px}
 html body .cabinet-event{padding:14px 12px;gap:10px}
 html body .cabinet-event>button{min-width:44px;min-height:44px}
 html body .cabinet-event .event-title{font-size:13px;line-height:1.45;overflow-wrap:anywhere}
 html body .cabinet-event small{font-size:11px}
 html body .calendar-layout>.cabinet-panel{overflow:hidden}
}

@media(max-width:599px){
 html body .t-analysis-heading{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:0 10px 8px}
 html body .t-analysis-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html body .t-analysis-heading .t-tabs{grid-column:1/-1;padding:0 4px;gap:22px}
 html body .terminal .t-presentation-action{min-width:0;min-height:44px;white-space:normal;text-align:left;padding:7px 4px;line-height:1.4}
 html body .portfolio-heading{gap:8px;margin:12px 0}
 html body .portfolio-heading label{flex-basis:100%;display:grid;gap:6px}
 html body .portfolio-heading select{width:100%;max-width:none;font-size:16px}
 html body .portfolio-heading>.quiet{min-height:44px;padding:8px 0;font-size:12px}
 html body .workspace-tabs{gap:4px}
 html body .workspace-tabs button{padding-inline:10px;font-size:13px}
 html body .terminal-dialog header{gap:10px;align-items:flex-start}
 html body .terminal-dialog header h2{font-size:19px;line-height:1.35}
 html body .terminal-dialog header button[data-close]{flex:none;width:44px;min-height:44px}
}

/* The catalogue picker has one viewport, not nested phone-sized gutters. */
@media(max-width:599px){
 html body dialog.t-picker-dialog{inset:0;margin:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;padding:0;border:0;border-radius:0;overflow:hidden}
 html body dialog.t-picker-dialog[open]{display:flex;flex-direction:column}
 html body .t-picker-dialog>header{flex:none;min-height:64px;padding:10px 12px 10px 16px;align-items:center}
 html body .t-picker-dialog>header h2{margin:0}
 html body .t-picker-dialog .t-dialog-body{flex:1;min-height:0;height:auto;max-height:none;padding:0;overflow:hidden}
 html body .t-picker-tabs{padding-inline:16px;flex:none;gap:24px}
 html body .t-picker-tabs button{min-height:44px}
 html body .t-picker-content{padding-bottom:env(safe-area-inset-bottom)}
 html.workspace-picker .workspace{padding:12px!important}
 html.workspace-picker .toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-inline:0}
 html.workspace-picker .toolbar>.search{flex:1 0 100%}
 html.workspace-picker .toolbar>#sector{flex:1;min-width:0}
 html.workspace-picker .search{height:44px;min-height:44px;width:100%;min-width:0}
 html.workspace-picker .search input{height:100%;min-height:0;font-size:16px;background:transparent}
 html.workspace-picker .viewbar{gap:8px}
 html.workspace-picker .viewbar button,html.workspace-picker .bond-actions button:not(.inline-help){min-height:44px}
 html.workspace-picker .table-jumps,html.workspace-picker .bond-scrollnav .jump{display:none}
 html.workspace-picker :is(#tablewrap,#bond-table) .personal-action{position:sticky!important;right:0!important;min-width:110px;width:110px;padding:4px 6px!important;background:#fff;box-shadow:-3px 0 5px #193b540d;z-index:5}
 html.workspace-picker :is(#tablewrap,#bond-table) th.personal-action{background:#edf3f7;z-index:12}
 html.workspace-picker .personal-action .personal-portfolio{width:100%;min-height:44px;padding:8px 6px;font-size:12px;white-space:normal;line-height:1.4}
 html.workspace-picker .picker-added{font-size:12px;color:#496f62}
}

@media(max-width:1439px){
 html.workspace-picker #responsive-filters[hidden]{display:none!important}
 html.workspace-picker .screen-basic{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:599px){
 html.workspace-picker .screen-basic{grid-template-columns:minmax(0,1fr)}
 html.workspace-picker .screening-panel input:not([type=checkbox]),html.workspace-picker .screening-panel select{min-height:44px;font-size:16px}
 html.workspace-picker .strategy-bar{gap:6px;margin-block:8px 12px}
 html.workspace-picker .strategy-bar>button{min-height:44px;padding:7px 10px}
}

/* Authentication is one focused form, without a repeated page heading. */
html body .main:has(>#auth:not([hidden]) .auth-card)>.page-heading,
html body .main:has(>#auth:not([hidden]) .auth-card)>.context-foot{display:none}
html body #auth .auth-card h1{font-size:22px;line-height:1.3;margin:0 0 12px}
@media(max-width:899px){
 html body #auth .auth-card{width:calc(100% - 32px);max-width:440px;margin:24px auto;padding:24px 20px;box-sizing:border-box}
 html body .auth-card button{min-height:44px;font-size:14px;line-height:1.4;white-space:normal}
 html body .auth-card input{min-height:44px;font-size:16px}
 html body .auth-card .text-link{margin-top:8px}
 html body .auth-card p:empty{margin:0}
}
@media(max-width:359px){
 html body #auth .auth-card{width:calc(100% - 24px);padding:20px 16px}
}

@media(max-width:899px){
 html body.compact-bonds :is(.compact-search-row,.scenario-search-row) .search,
 html body.compact-stocks .search{height:44px;min-height:44px}
 html body.compact-bonds :is(.compact-search-row,.scenario-search-row) .search input,
 html body.compact-stocks .search input{height:100%;font-size:16px}
 html body.compact-bonds .strategy-bar>button,
 html body.compact-bonds .compact-presets-more>summary{min-height:44px}
 html body .resume-footer button{min-height:44px}
}
@media(max-width:599px){
 html.workspace-picker .responsive-filter-toggle{margin:12px;width:calc(100% - 24px)}
 html.workspace-picker .inline-help{display:inline-grid;place-items:center;flex:none;width:24px;height:24px;min-height:24px;padding:0;line-height:1;font-size:12px;border-radius:50%}
 html.workspace-picker .bond-search-scope{display:flex;align-items:center;min-height:44px}
 html.workspace-picker .screening-panel .strategy-bar{margin-inline:0}
}

@media(max-width:899px){
 html body #portfolio-app .periods{gap:4px;flex-wrap:wrap}
 html body #portfolio-app .periods button{min-height:44px;padding:8px 10px;font-size:12px;line-height:1.4}
 html body #portfolio-app .history-dates>button{min-height:44px}
}

/* Scenario assumptions read as complete labels on phones. */
@media(max-width:899px){
 html body.compact-bonds .scenario-preview .scenario-add-point{min-height:44px;align-items:center}
 html body.compact-bonds .scenario-preview .scenario-controls input,html body.compact-bonds .scenario-preview .scenario-controls select{min-height:44px;font-size:16px}
}
@media(max-width:599px){
 html body.compact-bonds .scenario-preview .scenario-spreads{grid-template-columns:minmax(0,1fr);gap:12px}
}

/* The ladder keeps its data table locally scrollable; the plan itself fits the viewport. */
@media(max-width:1099px){
 html body .bond-ladder{margin:20px 0 0;min-width:0}
 html body .ladder-intro{flex-wrap:wrap;gap:16px;margin:16px 0 20px}
 html body .ladder-intro h2{font-size:24px}
 html body .ladder-actions{flex-wrap:wrap;white-space:normal}
 html body .ladder-actions button{min-height:44px}
 html body .ladder-scenarios{grid-template-columns:minmax(0,1fr);gap:8px}
 html body .ladder-scenarios>button{min-height:76px;padding:12px 14px;white-space:normal}
 html body .ladder-scenarios>button>span:not(.ladder-scenario-icon){min-width:0}
 html body .ladder-scenarios strong{font-size:14px}
 html body .ladder-scenarios small{font-size:12px}
 html body .ladder-section-head{flex-wrap:wrap;gap:8px;margin-bottom:18px}
 html body .ladder-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 html body .ladder-field{font-size:13px;line-height:1.4}
 html body .ladder-field :is(input,select),html body .ladder-goal input{min-height:44px;height:44px;font-size:16px}
 html body .ladder-field>button{min-height:44px;font-size:14px}
 html body .ladder-applied,html body .ladder-model-note{flex-wrap:wrap;gap:8px;font-size:12px;line-height:1.5}
 html body .ladder-applied .quiet,html body .ladder-model-note .quiet,html body .ladder-section-head .quiet{min-height:44px;font-size:12px}
 html body .ladder-metrics{gap:16px}
 html body .ladder-metrics strong{font-size:22px;overflow-wrap:anywhere}
 html body .ladder-legend{flex-wrap:wrap;gap:10px;font-size:11px}
 html body .ladder-table{min-width:960px}
 html body .ladder-rung-tabs button{min-height:44px;font-size:12px}
 html body .ladder-calendar{grid-template-columns:repeat(6,minmax(0,1fr));row-gap:20px}
 html body .ladder-payment-list>button{grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:44px;line-height:1.5}
 html body .ladder-payment-list>button>span:nth-child(2){text-align:right}
}
@media(max-width:599px){
 html body .ladder-intro h2{font-size:22px;letter-spacing:0}
 html body .ladder-intro>div{min-width:0;width:100%}
 html body .ladder-actions{gap:6px}
 html body .ladder-actions button{flex:1;padding:8px;font-size:12px}
 html body .ladder-panel,html body .ladder-summary{padding:18px 14px}
 html body .ladder-fields,html body .ladder-filter-grid{grid-template-columns:minmax(0,1fr)}
 html body .ladder-span2{grid-column:auto}
 html body .ladder-metrics{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:16px}
 html body .ladder-metrics strong{margin:4px 0;font-size:24px}
 html body .ladder-metrics span,html body .ladder-metrics small{font-size:12px;line-height:1.5}
 html body .ladder-rung{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:12px 0!important;white-space:normal}
 html body .ladder-rung>span:first-child{grid-column:1;grid-row:1}
 html body .ladder-rung>span:last-child{grid-column:2;grid-row:1}
 html body .ladder-rung>.ladder-track{grid-column:1/-1;grid-row:2}
 html body .ladder-legend span:last-child{margin-left:0;flex-basis:100%}
 html body .ladder-composition{padding:0}
 html body .ladder-composition>.ladder-section-head{padding:18px 14px 0}
 html body .ladder-rung-tabs{padding-inline:14px}
 html body .ladder-calendar{grid-template-columns:repeat(3,minmax(0,1fr))}
 html body .ladder-month strong{font-size:12px}
 html body .ladder-month small{font-size:11px}
 html body .ladder-goal{grid-template-columns:minmax(0,1fr) 44px;gap:8px}
 html body .ladder-goal>label{grid-column:1/-1}
 html body .ladder-goal>label:nth-last-child(2){grid-column:1}
 html body .ladder-goal>button{grid-column:2;min-height:44px}
 html body .ladder-issuer-list>label{flex-wrap:wrap;gap:8px}
 html body .ladder-issuer-list select{width:100%;min-height:44px;font-size:16px}
 html body .ladder-alternatives>div,html body .ladder-saved>div{flex-wrap:wrap}
}

/* Keep market-map labels readable instead of scaling a desktop SVG down. */
@media (max-width: 899px) {
  .market-map { padding: 16px 0; }
  .market-map .map-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .market-map .map-controls label { min-width: 0; font-size: 12px; }
  .market-map .map-controls label:first-child, .market-map .map-controls > button { grid-column: 1 / -1; }
  .market-map .map-controls select { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; font-size: 16px; }
  .market-map .map-controls > button { margin: 0; min-height: 44px; }
  .market-map .map-caption { flex-wrap: wrap; gap: 8px; }
  .market-map .map-issues { grid-template-columns: 1fr; }
  .market-map .map-issues button { min-height: 44px; }
}
