/* V246: additive, scoped visual hardening; no storage or trading logic. */
/* 2/6: consistent card sizing and legible eight-stock preview */
.challenge .market-section .preview-grid{align-items:stretch}
.challenge .market-section .preview-stock{width:100%;min-width:0;min-height:178px;box-sizing:border-box}
.challenge .market-section .preview-stock strong{max-width:100%;overflow-wrap:break-word;line-height:1.32}
.challenge .market-section .preview-stock .stock-symbol.has-brand-icon img{object-fit:contain;max-width:100%;max-height:100%}
/* 3/6: index navigation remains compact and tappable */
.challenge .market-section .index-tabs{width:100%;max-width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
.challenge .market-section .index-tab{min-width:0;min-height:44px;overflow-wrap:normal;word-break:keep-all;text-align:center}
/* 4/6: accessible trading modal on small phones and with large text */
.challenge .stock-modal .stock-modal-panel{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);overscroll-behavior:contain}
.challenge .trade-panel .trade-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.challenge .trade-panel .trade-actions button{min-width:0;min-height:48px;white-space:normal}
.challenge .trade-panel .quantity-row button{min-width:44px;min-height:44px}
.challenge .trade-panel #trade-message{overflow-wrap:anywhere}
/* 5/6: chart and figures stay within their container */
.challenge .market-chart{min-width:0;overflow:hidden}
.challenge .market-chart #wealth-chart{display:block;width:100%;max-width:100%;height:auto}
.challenge .market-chart #chart-caption,.challenge .stats strong{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
/* 6/6: shared readability, keyboard and reduced-motion finishing */
.challenge .market-section .demo-label,.challenge .trade-disclaimer,.challenge .mode-note{line-height:1.5}
.challenge .stock-preview #show-all,.challenge .stock-modal button,.challenge .mode-btn{touch-action:manipulation}
.challenge button:focus-visible,.challenge input:focus-visible,.challenge a:focus-visible,.challenge summary:focus-visible{outline:3px solid #ffd54d;outline-offset:3px}
@media(max-width:390px){
 .challenge .market-section .preview-grid{gap:8px}
 .challenge .market-section .preview-stock{padding:10px 7px;min-height:174px}
 .challenge .market-section .index-tabs{gap:4px}
 .challenge .market-section .index-tab{font-size:clamp(10px,2.8vw,13px);padding:8px 3px}
 .challenge .trade-panel .trade-actions{gap:7px}
}
@media(prefers-reduced-motion:reduce){
 .challenge .preview-stock,.challenge .index-tab,.challenge .trade-actions button{transition:none!important;animation:none!important}
}
