@media(max-width:700px){
 body:not(.member-view){font-size:14px}body:not(.member-view) main{width:100%;min-width:0}
 header{height:auto;min-height:76px;display:flex;flex-wrap:wrap;gap:10px 14px;padding:12px 16px}header .brand-group{flex:1 1 auto}header nav{display:none}header .account-nav{gap:12px;flex:0 1 auto;min-width:0;font-size:11px}header .account-nav a{min-height:36px;display:inline-flex;align-items:center}header .account-nav #accountLink{padding:8px 10px}header .brand{font-size:25px}header .brand span{font-size:9px;letter-spacing:1.3px}
 .hero{padding:24px 18px}.hero .hero-copy{margin-top:32px}.hero .academy-title{font-size:clamp(42px,12.7vw,76px);line-height:1.13;letter-spacing:-2px;margin:0 0 24px}.hero .academy-title span{white-space:normal;overflow-wrap:normal}.hero .intro{font-size:14px;line-height:1.7;margin-top:20px}.hero .button{margin-top:24px}.hero .hero-top .eyebrow{font-size:8px;letter-spacing:1px;line-height:1.8;white-space:normal}
 .hero .sculpture{height:clamp(250px,75vw,330px);min-height:0;max-width:340px;margin:20px auto}.hero .object-label{font-size:8px}.hero-bottom{align-items:start}.hero-bottom>*{max-width:100%}
 :is(#academy,#network,#lab,#simulator,#strategies,#glossary,#sources){padding:48px 18px;min-width:0;width:100%}
 :is(#academy,#network,#lab,#simulator,#strategies,#glossary,#sources) :is(h2,h3,h4,p,label,summary){overflow-wrap:break-word;max-width:100%}
 .section-heading h2,.risk-grid h2{font-size:clamp(28px,7.6vw,42px);line-height:1.2;letter-spacing:-1px}.section-heading>p{font-size:13px;line-height:1.75}.section-heading .eyebrow{font-size:9px;letter-spacing:1.2px}
 .network-description,.owner-sentence{white-space:normal!important;font-size:13px!important;line-height:1.8!important}.editorial-line{display:inline;white-space:normal}.editorial-line+.editorial-line:before{content:' '}
 .academy-layout,.trade-info,.risk-grid,.fitness-layout,.sources{min-width:0}.academy-layout>*{min-width:0}#academy .chapter h3{font-size:17px;line-height:1.45}#academy .chapter{grid-template-columns:22px minmax(0,1fr) 18px;gap:9px;padding:20px 0}
 .terminal-head{padding:18px 14px}.terminal-head span{margin:8px 0 0;display:block;line-height:1.6}.ohlc{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:14px}.ohlc b{font-size:12px;white-space:normal;overflow-wrap:anywhere}.ohlc span{font-size:9px;letter-spacing:.5px}
 #lab .chart-wrap,#lab .portfolio-chart-wrap,.sim-chart-wrap,.hindsight-chart-wrap{width:100%;min-width:0;max-width:100%;overflow:visible}
 #chart,#portfolioChart,#simChart,#simChart:not(:has(polyline)),#hindsightChart,.portfolio-chart-wrap svg,.sim-chart-wrap svg,.hindsight-chart-wrap svg{display:block;width:100%;min-width:0!important;max-width:100%;height:auto}
 .chart-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px}.chart-options label{min-width:0;width:100%;font-size:11px}.chart-options select{width:100%;max-width:100%;min-width:0;font-size:14px;padding:10px 6px}.chart-controls{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px}.chart-controls input{grid-row:auto}.chart-controls span{font-size:11px;white-space:normal}.chart-legend{font-size:11px;line-height:1.6;padding:14px}.chart-controls button{white-space:normal}
 .portfolio-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.portfolio-inputs label{width:auto;min-width:0}.portfolio-inputs input{max-width:100%}
 #lab .ledger-wrap,#lab .candle-table-wrap,#simulator .ledger-wrap{overflow:visible;width:100%;max-height:none}
 #lab table,#simulator table{display:block;width:100%;min-width:0;max-width:100%}#lab table thead,#simulator table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#lab table tbody,#simulator table tbody{display:grid;gap:14px;width:100%}
 #lab table tbody tr,#simulator table tbody tr{display:block;padding:12px 14px;border:1px solid #373737;border-radius:10px;background:#151515;width:100%;min-width:0}
 #lab table tbody :is(td,th),#simulator table tbody :is(td,th){display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px;width:auto!important;min-width:0;white-space:normal!important;overflow-wrap:anywhere;padding:10px 0;font-size:12px;line-height:1.65;text-align:left;border-color:#333}
 #lab table tbody :is(td,th):before,#simulator table tbody :is(td,th):before{content:attr(data-label);font-size:10px;color:#a9a9a9;line-height:1.7;font-weight:400}
 #lab table tbody [colspan],#simulator table tbody [colspan]{display:block}#lab table tbody [colspan]:before,#simulator table tbody [colspan]:before{display:none}
 .trade-review{gap:20px}.execution-heading h3,.case-heading h3,.hindsight-heading h3{font-size:24px;line-height:1.3}.execution-stats,.portfolio-stats,.sim-result-grid{padding:16px;gap:16px}.sim-stats{gap:18px}.sim-stats b{font-size:18px;white-space:normal}.sim-toolbar{gap:20px}.sim-toolbar>div{width:auto;min-width:0;flex:1}.sim-notice{padding:18px}.sim-notice span{font-size:12px}
 .network-stage{gap:5px;margin:36px 0}.node>span{height:48px;width:48px;max-width:100%}.node b{font-size:10px}.node small{font-size:7px}.network-line{top:24px}.network-detail{padding-top:24px}.transfer-check{padding:18px}
 .strategy-grid h3{font-size:36px}.strategy-grid article>p,.term p,.term-example p{font-size:13px;line-height:1.8}.source-links a{overflow-wrap:anywhere}.source-copy>span{white-space:normal}
 #lesson{width:calc(100% - 24px);max-width:calc(100% - 24px)}#lessonContent{padding:22px 16px 28px}#lessonContent h2{font-size:28px;overflow-wrap:break-word}#lessonContent :is(p,li){font-size:14px;line-height:1.8}.mc-option{min-width:0}.mc-option span{min-width:0;overflow-wrap:anywhere}
}
@media(max-width:380px){header .account-nav{width:100%;justify-content:space-between;gap:10px}header .brand-group{width:100%}header .owner-line{display:none}.hero .academy-title{font-size:44px}.hero-bottom{flex-direction:column;gap:10px}.section-heading h2{font-size:28px}.execution-inputs,.input-grid{grid-template-columns:minmax(0,1fr)}.execution-inputs>p{grid-column:auto}}

/* The hero action shares the exact width of the two-line title. */
.hero .hero-copy{width:max-content;max-width:61%}.hero .academy-title{width:max-content;max-width:100%;margin-bottom:28px}.hero .hero-copy>.button{display:flex;width:100%;max-width:100%;justify-content:space-between;box-sizing:border-box;margin-top:0}
@media(max-width:700px){.hero .hero-copy{width:max-content;max-width:100%}.hero .academy-title{width:max-content;max-width:100%;margin-bottom:24px}.hero .hero-copy>.button{margin-top:0;width:100%;padding:16px 18px}}

/* Start and restart sit within the chart; trading hides the overlay. */
#simulator .sim-chart-wrap{position:relative;background-color:#111313;background-image:linear-gradient(#ffffff04 1px,transparent 1px),linear-gradient(90deg,#ffffff04 1px,transparent 1px);background-size:64px 64px}
#simStartOverlay{position:absolute;inset:0;z-index:2;display:grid;place-items:center;padding:24px;pointer-events:none}
#simStartOverlay[hidden]{display:none}
#simStartOverlay #simStart{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;max-width:100%;width:auto;min-width:min(240px,100%);min-height:52px;margin:0;padding:17px 25px;border-radius:10px;background:#e6e7e2;border:1px solid #f0f1eb;color:#131413;font-size:13px;line-height:1.5;box-shadow:0 8px 32px #0006}
#simStartOverlay #simStart:hover:not(:disabled){background:#fff;transform:translateY(-2px)}
#simStartOverlay #simStart:disabled{opacity:.75;box-shadow:none}
@media(max-width:700px){#simStartOverlay{padding:20px}#simStartOverlay #simStart{min-width:0;width:min(260px,100%);padding:16px 18px;font-size:13px}#simulator .sim-toolbar{justify-content:space-between}}

/* Keep playback controls on one consistent row at every screen width. */
#lab .chart-controls{display:grid;grid-template-columns:44px 44px 44px minmax(80px,1fr) auto;align-items:center;gap:10px;padding:16px 20px}
#lab .chart-controls #replay,#lab .chart-controls #prevCandle,#lab .chart-controls #nextCandle{display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid #555;border-radius:9px;background:#1c1d1c;color:#ddd;line-height:1}
#lab #replay{grid-column:1;grid-row:1}#lab #prevCandle{grid-column:2;grid-row:1}#lab #nextCandle{grid-column:3;grid-row:1}
#lab #replay svg,#lab #prevCandle svg,#lab #nextCandle svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#lab #replay[aria-pressed=true]{background:#ddd;color:#111;border-color:#ddd}
#lab .chart-controls #scrub{grid-column:4;grid-row:1;width:100%;min-width:0;margin:0;accent-color:#ddd}
#lab .chart-controls #showAll{grid-column:5;grid-row:1;min-height:44px;border-radius:9px;padding:10px 14px;white-space:nowrap}
#lab .chart-controls #replayStatus{grid-column:1/-1;grid-row:2;margin:0;text-align:right;font-size:11px;line-height:1.7;white-space:normal;color:#aaa}
@media(max-width:700px){#lab .chart-controls{grid-template-columns:44px 44px 44px minmax(0,1fr);gap:8px;padding:14px}#lab .chart-controls #showAll{grid-column:4;grid-row:1;justify-self:end;padding:10px;font-size:11px}#lab .chart-controls #scrub{grid-column:1/-1;grid-row:2;min-height:32px}#lab .chart-controls #replayStatus{grid-row:3;text-align:center}}
