.earth-budget-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:18px;padding:18px}
.earth-budget-stage>svg{display:block;width:100%;height:auto;max-height:300px}
.earth-budget-stage svg text{font:15px var(--ad-font);fill:#667653}
.earth-budget-stage svg .earth-budget-temperature{font-size:27px;font-weight:700}
.earth-budget-stage svg .earth-budget-caption{font-size:12px}
.earth-budget-controls{padding:12px;background:#eff2e6;border-radius:10px;display:flex;flex-direction:column;gap:8px}
.earth-budget-controls label{font-size:13px;line-height:1.6;color:#586d4d;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px}
.earth-budget-controls input{width:100%;accent-color:#8a9e70;margin:1px 0 9px}
.earth-budget-presets{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:6px}
.earth-budget-presets button{font:12px var(--ad-font);padding:9px 6px;color:#5e7252;border:1px solid #c8d1b8;border-radius:6px;background:#fffdf3;cursor:pointer}
.earth-budget-presets button[aria-pressed="true"]{background:#dce6ce;border-color:#8b9e74;font-weight:600}
.earth-control-hint{font-size:12px;color:#7b836d;line-height:1.7;margin:0 0 8px}
.earth-budget-bars{display:grid;gap:14px;margin:4px 12px 18px}
.earth-budget-bars>div{display:grid;grid-template-columns:92px minmax(0,1fr) 52px 42px;gap:9px;align-items:center;font-size:13px;color:#667653}
.earth-budget-bars i{display:block;height:15px;background:#e6e8d9;border-radius:4px;overflow:hidden}
.earth-budget-bars b{display:block;height:100%;background:#c49c4f}
.earth-budget-bars>div:nth-child(2) b{background:#b57763}
.earth-budget-status{font-size:15px;text-align:center;line-height:1.8;color:#5d7656;margin:12px}
.earth-budget-numbers{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.earth-budget-numbers>div{display:grid;gap:5px;color:#758367;font-size:12px}
.earth-budget-numbers strong{font-size:17px;color:#5e7856}
#earth-temperature-chart{width:100%;height:95px}
#earth-temperature-chart text{font:11px var(--ad-font);fill:#7c876f}
.earth-budget-lab>.primer-model-note{margin-block:0 12px}
/* Desktop: wide visual workspace, compact controls at the right. Content
   remains accessible when notes expand; no fixed-height clipping. */
@media(min-width:900px){
 .landscape-lab-shell{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:16px;padding:16px;align-items:start}
 .landscape-lab-controls{background:#f0f2e6;border-radius:10px;padding:10px;min-width:0}
 .landscape-lab-controls>:is(.lab-controls,.thermal-temperature,.thermal-presets,.camera-controls,.primer-model-note,.thermal-mini-note,.spectrum-context-tabs,.camera-instruction,.lab-takeaway){margin:0 0 12px;padding:0}
 .landscape-lab-controls .lab-controls{display:block}
 .landscape-lab-controls .lab-presets{display:flex;flex-wrap:wrap;gap:5px}
 .landscape-lab-controls :is(.thermal-presets,.camera-controls,.spectrum-context-tabs){display:flex;flex-wrap:wrap;gap:5px}
 .landscape-lab-controls :is(.lab-presets,.thermal-presets) button{flex:1 1 40%;font-size:11px}
 .landscape-lab-controls .thermal-temperature{display:flex;flex-direction:column;align-items:stretch}
 .landscape-lab-controls .temperature-number{align-self:flex-end}
 .landscape-lab-controls .thermal-temperature input[type=range]{width:100%}
 .landscape-lab-controls .temperature-limits{width:100%;font-size:10px}
 .landscape-lab-controls .heat-controls{display:grid;grid-template-columns:1fr;gap:8px}
 .landscape-lab-controls .primer-model-note{font-size:12px;line-height:1.7}
 .landscape-lab-controls .emitter-advanced>summary{padding:8px 0}
 .landscape-lab-controls .emitter-advanced>*{margin-inline:0}
 .landscape-lab-scene{min-width:0}
 .landscape-lab-scene>:is(.lab-pair,.gas-observation-note,.emitter-view-tabs,.micro-figure,.emitter-figure,.thermal-metrics,.emission-main-note,.camera-scene,.heat-scene,.lab-takeaway){margin-inline:0!important}
 #motion-lab .gas-comparison{grid-template-columns:1fr 1fr;gap:10px;margin-top:0}
 #motion-lab .gas-comparison figure{padding:8px 3px;min-width:0}
 #motion-lab .gas-comparison figure>.gas-vessel-scene{height:auto;max-height:300px}
 #emission-lab #emitter-whole-view>svg{height:250px;max-height:250px}
 #emission-lab #emitter-micro-view>svg{height:auto;max-height:250px}
 #emission-lab .emitter-compact-labels{font-size:11px!important}
 #emission-lab .compact-emission-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px}
 #emission-lab .compact-emission-metrics b{font-size:19px}
 #emission-lab .emitter-view-tabs{gap:5px;margin-top:0}
 #emission-lab .emitter-view-tabs button{font-size:11px;padding:7px}
 #emission-lab .emission-main-note{font-size:12px}
 #thermal-lab .celestial-comparison{padding:0;gap:6px;margin:0}
 #thermal-lab .celestial-comparison figure{gap:5px}
 #thermal-lab .celestial-comparison svg{width:100px;height:85px}
 #thermal-lab .celestial-comparison figcaption{font-size:11px}
 #thermal-lab .celestial-note{font-size:12px;line-height:1.6;margin:6px 0}
 #thermal-lab .spectrum-study-tabs{padding:5px 0}
 #thermal-lab .spectrum-study-tabs button{min-height:30px;padding:5px;font-size:12px}
 #thermal-lab #spectrum-plot{height:auto;max-height:260px;min-height:0}
 #thermal-lab .spectrum-top{margin:8px 0;padding:0;gap:6px}
 #thermal-lab .spectrum-top b{font-size:13px}
 #thermal-lab .spectrum-top button{font-size:11px;padding:5px}
 #thermal-lab .spectrum-legend{margin:6px 0}
 #thermal-lab .spectrum-scale-note{margin:4px 0;padding:7px;font-size:11px}
 #thermal-lab .thermal-mini-note{font-size:11px;margin:7px 0}
 #thermal-lab .power-comparison{padding:10px 0;gap:15px;min-height:0}
 #thermal-lab .power-comparison>div{grid-template-columns:115px minmax(0,1fr) 90px;gap:8px;font-size:12px}
 #thermal-lab .power-comparison i{height:22px}
 #thermal-lab .thermal-metrics{margin:10px 0}
 #thermal-lab .thermal-metrics b{font-size:20px}
 #thermal-lab .power-specimens{padding:0}
 #thermal-lab .radiant-specimen svg{height:130px}
 #camera-lab .camera-target svg{height:145px}
 #camera-lab .camera-scene{margin-top:0}
 #camera-lab .camera-metrics b{font-size:19px}
 #transfer-lab .heat-scene{padding:0;gap:10px}
 #transfer-lab .heat-material{height:90px}
 #transfer-lab .heat-bridge{padding-top:90px}
 #transfer-lab .heat-particle-box{max-height:130px}
 .landscape-lab.thermal-expanded .landscape-lab-shell{grid-template-columns:minmax(0,1fr) 290px;max-width:1500px;margin:auto}
 .landscape-lab.thermal-expanded .landscape-lab-scene{align-self:center}
 .thermal-expanded.earth-budget-lab .earth-budget-layout{max-width:1500px;margin:auto}
 .thermal-expanded.earth-budget-lab .earth-budget-stage>svg{height:clamp(260px,43dvh,420px);max-height:none}
}
@media(max-width:899px){
 .landscape-lab-shell{display:flex;flex-direction:column;padding:10px}
 .landscape-lab-scene,.landscape-lab-controls{width:100%;min-width:0}
 .landscape-lab-controls .lab-controls{margin-inline:0}
 .landscape-lab-scene .lab-pair{margin-inline:0}
 .landscape-lab-controls .primer-model-note{margin-inline:6px}
 .earth-budget-layout{grid-template-columns:1fr;padding:10px;gap:8px}
 .earth-budget-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px}
 .earth-budget-presets,.earth-control-hint,.earth-budget-numbers,#earth-temperature-chart{grid-column:1/-1}
 .earth-budget-controls input{align-self:center}
}
@media(max-width:550px){
 .earth-budget-bars>div{grid-template-columns:76px minmax(0,1fr) 42px 36px;font-size:11px;gap:6px}
 .earth-budget-stage svg text{font-size:16px}
 .earth-budget-controls{display:flex}
 .earth-budget-controls label{font-size:13px}
}
@media(min-width:900px){
 #emission-lab #emitter-whole-view>svg{height:210px;max-height:210px}
 #emission-lab .emitter-figure{margin-block:4px 6px}
 #emission-lab .compact-emission-metrics{padding:8px;margin-bottom:6px}
 #emission-lab .compact-emission-metrics :is(small,span){line-height:1.4}
 .landscape-lab .thermal-metrics>div{padding:8px 5px}
 .landscape-lab .thermal-metrics small{margin-bottom:4px}
 #camera-lab .camera-target svg{height:110px}
 #camera-lab .camera-metrics{padding-block:0}
 #camera-lab #camera-status{padding:8px 12px;margin-block:8px}
 #transfer-lab .heat-particle-box{max-height:100px;margin-bottom:8px}
 #transfer-lab .heat-material{height:80px}
 #transfer-lab .heat-block{padding:8px}
 #transfer-lab .heat-block strong{font-size:22px;margin:5px 0}
 #transfer-lab .heat-motion-control{padding:0 0 8px;flex-wrap:wrap}
 #thermal-lab #spectrum-plot{max-height:230px}
 #thermal-lab.thermal-expanded #spectrum-plot{max-height:300px}
 .earth-budget-controls{gap:5px}
 .earth-budget-controls input{margin-bottom:5px}
 .earth-budget-presets button{padding:6px 4px;min-height:32px;line-height:1.6}
 .earth-budget-numbers{line-height:1.6}
 #earth-temperature-chart{height:75px}
}
