.thermal .masthead{position:static}
.thermal .boundaries label{align-content:space-between}
.thermal-intro{padding-block:clamp(2rem,4vw,3.8rem)}
.thermal-intro h1{font-size:clamp(3rem,7vw,6rem);max-width:16ch}
.thermal-intro>p:last-child{max-width:54ch;color:#bfcedd;font-size:clamp(1.04rem,2vw,1.24rem)}
.thermal-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);padding-block:clamp(1.5rem,5vw,4rem);gap:clamp(1.3rem,4vw,4.5rem)}
.thermal-grid>form,.thermal-grid>div{min-width:0}
.workbench-heading{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:.35rem .8rem;border-bottom:1px solid #bdcad4;padding-bottom:.75rem;margin-bottom:1rem}
.workbench-heading h2{font-size:clamp(2rem,4vw,3rem)}
.workbench-heading span,.thermal label,.plot-legend{font-size:.85rem;color:#3a5365}
.thermal button{min-height:44px;padding:.46rem .75rem;border:1px solid #829db0;border-radius:5px;background:#fff;color:#123b56;font:inherit;font-size:.87rem;font-weight:650;cursor:pointer}
.thermal button.dark{background:#153a54;color:#fff;border-color:#153a54}
.thermal button:disabled{opacity:.55;cursor:default}
.thermal :is(button,input,summary):focus-visible{outline:3px solid #21739c;outline-offset:3px}
.preset,.command{display:flex;flex-wrap:wrap;gap:.5rem;margin:.75rem 0}
.boundaries,.thermal-layer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}
.thermal label{display:grid;gap:.18rem;font-weight:650;min-width:0}
.thermal input{width:100%;min-width:0;min-height:44px;border:1px solid #8499a9;border-radius:5px;padding:.35rem .5rem;color:#183145;background:#fff;font:inherit}
.thermal fieldset{min-width:0;border:0;border-top:1px solid #cbd6df;padding:.5rem 0 .7rem;margin:.75rem 0 0}
.thermal legend{padding:0 .4rem 0 0;font-weight:750}
.thermal-layer button{justify-self:start;grid-column:1/-1}
#run-status{color:#35556c;font-size:.86rem;min-height:2em}
#run-status[data-error=true]{color:#8f2728}
#empty-result{background:#eaf1f6;padding:1.5rem;border-left:3px solid #4c819f;color:#3b5366}
.simulation-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 .8rem}
.simulation-metrics div{padding:.55rem 0;border-bottom:1px solid #d3dfe6;display:grid}
.simulation-metrics span{color:#3d596b;font-size:.85rem}
.simulation-metrics strong{font-size:clamp(1.03rem,2.6vw,1.55rem);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#flow-direction{font-size:.88rem;margin-top:.65rem;color:#365469}
#profile-chart svg{width:100%;height:auto;display:block;background:#f0f5f8;border-radius:7px}
.plot-legend{margin:.5rem 0}
.thermal summary{cursor:pointer;font-weight:650}
.thermal table{border-collapse:collapse;width:100%;font-size:.87rem}
.thermal th,.thermal td{text-align:left;border-bottom:1px solid #cdd9e1;padding:.25rem .5rem}
#comparison-values{color:#35556c;font-size:.88rem;margin-top:.65rem}
#comparison:not(:empty){border-left:3px solid #2d7295;background:#e6f1f6;padding:.7rem;margin:1rem 0}
.thermal-method{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2rem;padding-block:clamp(2.6rem,6vw,5rem)}
.thermal-method h2{margin-top:.6rem;font-size:clamp(2.4rem,5vw,4.6rem)}
.thermal-method p:not(.eyebrow){margin-bottom:1rem;color:#bfcedd}
@media(max-width:760px){.thermal-grid,.thermal-method{grid-template-columns:minmax(0,1fr)}}
@media(max-width:400px){.thermal-layer{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-layer label:first-child{grid-column:1/-1}}

.sensitivity{border-top:1px solid #bdcad4;margin-top:1.5rem;padding-top:1rem}
.sensitivity h3{margin:0 0 .35rem}
.sensitivity p{color:#3a5365;font-size:.86rem}
.sensitivity .command{align-items:end}
.sensitivity select{min-height:44px;max-width:100%;padding:.35rem .5rem;border:1px solid #8499a9;border-radius:5px;background:#fff;color:#183145;font:inherit}
.sensitivity label{max-width:100%}
.sensitivity table{margin:.6rem 0 1rem}
.thermal-research p:not(.eyebrow){color:#3a5365}
.thermal-research ul{margin:0 0 1rem;padding-left:1.15rem}
.thermal-research li{margin-bottom:.35rem}
.thermal .navbar{min-height:54px;padding-block:.45rem}
.thermal-intro{padding-block:1rem 1.25rem}
.thermal-intro h1{font-size:clamp(2rem,4.6vw,4rem);max-width:none;margin:.2rem 0}
.thermal-intro>p:last-child{max-width:none;margin:0;font-size:clamp(.92rem,1.6vw,1.08rem)}
.workspace{padding-block:.85rem 1.4rem}
.workbench-tools{display:flex;align-items:center;justify-content:space-between;gap:.6rem 1.2rem;border-bottom:1px solid #b8cad7;padding-bottom:.55rem}
.workbench-tools .eyebrow{color:#285677;margin:0 0 .13rem}
#study-status{font-size:.87rem;color:#395569;margin:0;overflow-wrap:anywhere}
#study-status[data-error=true]{color:#8b2b2d}
.workbench-tools .command,.result-actions{margin:0}
.workspace-guide{display:inline-flex;align-items:center;min-height:44px;color:#174c6a;font-size:.88rem;font-weight:650}
.thermal-grid{padding-block:.8rem 0;gap:1.3rem;align-items:start}
.thermal-grid .workbench-heading{margin-bottom:.55rem;padding-bottom:.44rem}
.thermal-grid .workbench-heading h2{font-size:clamp(1.65rem,2.7vw,2.4rem)}
.thermal .preset{margin:.15rem 0 .55rem}
.thermal label{align-content:space-between}
.thermal fieldset{margin:.5rem 0 0;padding:.2rem 0 .32rem}
.thermal-layer{grid-template-columns:minmax(0,1fr) minmax(0,.65fr) minmax(0,.95fr) auto;align-items:end}
.thermal-layer button{grid-column:auto}
#profile-chart svg{max-height:clamp(135px,24vh,260px)}
.sensitivity{margin-top:.75rem;padding:.55rem 0}
.thermal [hidden]{display:none!important}
.mobile-results{display:none}
@media(min-width:950px) and (min-height:630px){
  .thermal-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.07fr);gap:clamp(.9rem,2vw,2rem)}
  .thermal-grid>form{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto}
  .thermal-grid>form,.results-pane{height:calc(100svh - 265px);min-height:352px}
  .editor-fields,.results-pane{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:.14rem .6rem .14rem .14rem}
  .results-pane{border-left:1px solid #cbd6df;padding-left:clamp(.9rem,2vw,2rem)}
  #run-status{min-height:1.2em;margin:0}
  #wall-form>.command{margin:.4rem 0}
}
@media(max-width:949px){
  .thermal-grid{grid-template-columns:minmax(0,1fr)}
  .mobile-results:not([hidden]){display:inline-flex}
  .thermal-layer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .thermal-layer label:first-child{grid-column:1/-1}
  .workbench-tools{align-items:flex-start;flex-direction:column}
}
@media(min-width:950px) and (min-height:630px){
  .simulation-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem}
  .simulation-metrics strong{font-size:clamp(.89rem,1.2vw,1.2rem)}
  .simulation-metrics span{font-size:.75rem}
  #comparison:not(:empty){margin:.45rem 0;padding:.5rem;font-size:.9rem}
  #flow-direction,#comparison-values{margin-top:.35rem}
  #result-content h3{margin:.45rem 0 .25rem;font-size:1rem}
  #profile-chart svg{max-height:clamp(100px,20vh,200px)}
}
@media(min-width:950px) and (min-height:630px){
  .thermal-intro{padding-block:.65rem .85rem}
  .thermal-intro h1{font-size:clamp(2.25rem,3.65vw,3.2rem)}
  #comparison:not(:empty){line-height:1.35}
  #profile-chart svg{max-height:clamp(100px,18vh,180px)}
}
