:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#183544;background:#f3f6f7;font-size:16px;line-height:1.55;--ink:#183544;--muted:#536d7b;--border:#ccd9df;--accent:#006979}*{box-sizing:border-box}body{margin:0}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.8rem,3vw,2.6rem);line-height:1.2;margin-bottom:.45rem}h2{font-size:1.35rem;line-height:1.35;margin-bottom:.6rem}h3{font-size:1.1rem}a{color:var(--accent)}.site-header{background:#173845;color:#fff;padding:1.4rem 1.5rem}.header-inner{max-width:1180px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:1rem}.header-inner p{margin-bottom:0}.eyebrow{font-size:.72rem;letter-spacing:.16em;opacity:.8;margin-bottom:.7rem!important}nav{display:flex;flex-wrap:wrap;gap:.5rem}nav a{color:#fff;text-decoration:none;padding:.55rem .8rem;border:1px solid #567481;border-radius:6px}nav [aria-current]{background:#286070}main{max-width:1180px;padding:2rem 1.5rem 3rem;margin:auto;min-width:0}.intro{max-width:960px;margin-bottom:1.2rem}.intro h2{font-size:clamp(1.4rem,2.5vw,1.8rem)}.scope{font-size:.94rem;color:var(--muted);border-left:3px solid #789eaa;padding-left:.8rem}.panel{background:white;border:1px solid var(--border);border-radius:10px;padding:1.4rem;margin:1.2rem 0;min-width:0;box-shadow:0 2px 5px #122e3e05}.section-heading{display:flex;align-items:flex-start;gap:.9rem;margin-bottom:1rem}.section-heading p{color:var(--muted);margin:0;font-size:.94rem}.step-number{display:inline-flex;background:#e8f2f4;color:var(--accent);font-weight:700;padding:.4rem .6rem;border-radius:6px}.notice{border:1px solid #bfd4dc;background:#edf5f8;color:#244757;padding:.8rem 1rem;border-radius:6px;overflow-wrap:anywhere}.notice[data-kind="ready"]{background:#edf8f3;border-color:#a6d2bd;color:#175c3e}.notice[data-kind="input"]{background:#f0f2f5;border-color:#c7cfd9;color:#344354}.notice p:last-child{margin-bottom:0}.input-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}label{display:flex;flex-direction:column;font-size:.9rem;font-weight:600;gap:.35rem;min-width:0}label span{font-size:.8rem;color:var(--muted);font-weight:400}input,select,textarea,button{font:inherit}input,select,textarea{border:1px solid #acbec7;border-radius:5px;padding:.62rem .7rem;color:var(--ink);background:#fff;min-width:0;max-width:100%;width:100%;font-size:.95rem}textarea{font-family:Consolas,monospace;font-size:.88rem;resize:vertical}input:focus,select:focus,textarea:focus,button:focus,a:focus,summary:focus{outline:3px solid #73b8c6;outline-offset:2px}button,.button-link,.file-button{display:inline-flex;justify-content:center;align-items:center;border:1px solid var(--accent);border-radius:5px;padding:.65rem 1rem;background:var(--accent);color:white;font-weight:600;text-decoration:none;cursor:pointer;font-size:.95rem;min-height:44px}button.secondary,.file-button{background:white;color:var(--accent)}button:disabled{opacity:.55;cursor:default}.toolbar,.reference-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1.3rem}.file-button{position:relative;overflow:hidden}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer}.reference-summary{font-size:.9rem;margin-top:1rem;overflow-wrap:anywhere}.reference-summary dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.3rem .8rem}.reference-summary dt{font-weight:600}.reference-summary dd{margin:0;overflow-wrap:anywhere}.wide{grid-column:1/-1}fieldset{margin-top:1.5rem;padding:1rem;border:1px solid var(--border);border-radius:7px}legend{padding:0 .4rem;font-weight:700}details{margin-top:1rem;padding-top:.75rem;border-top:1px solid #e1e8ec}summary{cursor:pointer;font-weight:600;padding:.2rem 0;margin-bottom:.6rem}details label{margin:.8rem 0}.inline-options{display:flex;gap:1.5rem;flex-wrap:wrap}.inline-options label:first-child{flex-direction:row;align-items:center}.inline-options input[type="checkbox"]{width:20px;height:20px}.saved-row{display:flex;align-items:end;gap:.8rem;flex-wrap:wrap}.saved-row label{flex:1;min-width:200px}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}.metric{padding:1rem;background:#e9f1f4;border:1px solid var(--border);border-radius:7px;min-width:0}.metric small{display:block;color:var(--muted)}.metric strong{font-size:1.25rem;overflow-wrap:anywhere}.equation-list{margin-top:1.2rem}.equation-card{background:white;border:1px solid var(--border);border-radius:9px;padding:1.2rem;margin-bottom:1rem;min-width:0}.equation-card h3{margin-bottom:.7rem}.equation-stage{padding:.7rem 0;border-top:1px solid #e2e9ed;min-width:0}.stage-label{display:block;font-size:.75rem;color:#617d8b;font-weight:700;letter-spacing:.08em;margin-bottom:.3rem;text-transform:uppercase}.equation-scroll{overflow-x:auto;max-width:100%;padding:.3rem 0}math{font-size:1.12rem;max-width:none;width:max-content;min-width:0;margin:.15rem 0}mtext{font-family:Segoe UI,Arial,sans-serif;font-size:.9em}.equation-card p{overflow-wrap:anywhere;margin-bottom:.4rem}.equation-card details{font-size:.87rem}.table-scroll{overflow-x:auto;max-width:100%;border:1px solid #d4dfe5;border-radius:5px}table{border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:.87rem;width:100%}th,td{padding:.5rem .7rem;border-bottom:1px solid #dde6eb;text-align:right;white-space:nowrap}th{background:#eaf1f4}th:first-child,td:first-child{text-align:left}.diagnostic{border-left:3px solid #6e8391;padding:.5rem .8rem;margin:.7rem 0;overflow-wrap:anywhere}.diagnostic small{display:block;color:var(--muted)}footer{text-align:center;color:var(--muted);font-size:.85rem;padding:1rem 1.2rem 2rem;border-top:1px solid var(--border)}[hidden]{display:none!important}code{overflow-wrap:anywhere;white-space:normal;font-size:.86em}ul,ol{padding-left:1.35rem}li{margin:.45rem 0}@media(max-width:800px){.input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.header-inner{align-items:flex-start;flex-direction:column}}@media(max-width:480px){main{padding:1.2rem .8rem 2rem}.site-header{padding:1.2rem .9rem}.panel,.equation-card{padding:1rem}.input-grid,.metric-grid{grid-template-columns:minmax(0,1fr)}.section-heading{gap:.6rem}.reference-summary dl{grid-template-columns:minmax(0,1fr)}.reference-summary dd{margin-bottom:.5rem}.toolbar button{flex:1 1 140px}.reference-actions>*{width:100%}.saved-row{align-items:stretch}.saved-row button{width:100%}.notice{font-size:.92rem}h2{font-size:1.2rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
.operand-list{display:grid;grid-template-columns:minmax(120px,.32fr) minmax(0,.68fr);gap:.3rem .8rem;font-size:.85rem;padding:.65rem;background:#f4f8fa;border-radius:5px;margin:0 0 .7rem}.operand-list dt{font-weight:600;overflow-wrap:anywhere}.operand-list dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.history-charts{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}.chart-card{border:1px solid var(--border);border-radius:6px;padding:.8rem;min-width:0}.chart-scroll{overflow-x:auto;max-width:100%;border-radius:5px}.chart-scroll svg{display:block;width:100%;min-width:560px;height:auto}.chart-legend{display:flex;flex-wrap:wrap;gap:.5rem 1.2rem;list-style:none;margin:.6rem 0 0;padding:0;font-size:.86rem}.chart-legend li{border-left:4px solid #007c91;padding-left:.45rem}.chart-legend li[data-series="1"]{border-color:#955e28}@media(max-width:480px){.operand-list{grid-template-columns:minmax(0,1fr)}.operand-list dd{margin-bottom:.35rem}}
.panel p,.panel li,.panel h2,.panel h3,.panel summary,.panel dt,.panel dd{overflow-wrap:anywhere}.section-heading>div{min-width:0}pre{max-width:100%;min-width:0;overflow:auto;white-space:pre;font-family:Consolas,monospace;font-size:.85rem;padding:.75rem;background:#f4f8fa;border:1px solid var(--border);border-radius:5px}

/* Independent Lab presentation: preserve native zoom and bounded equation/chart scrolling. */
body{padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
@media(any-pointer:coarse),(max-width:600px){button,.button-link,.file-button,nav a,summary{min-height:44px}nav a{display:inline-flex;align-items:center}input,select,textarea{min-height:44px;font-size:max(1rem,16px)}.inline-options input[type="checkbox"]{min-height:20px}.inline-options label:first-child{min-height:44px}}
.study-notice{margin-bottom:1rem}
.study-validation{margin-top:1rem;border-top:1px solid #e1e8ec;padding-top:.75rem}
/* All pointer types retain usable targets; checkbox geometry stays20px. */
input,select,textarea,nav a,summary{min-height:44px}
.inline-options input[type="checkbox"]{min-height:20px}
.inline-options label:first-child{min-height:44px}
nav a{display:inline-flex;align-items:center}

/* Align the Lab header with the content cards and keep the first disclosure compact. */
.header-inner{max-width:calc(1180px - 3rem)}
main{padding-top:1.5rem}
main>#thermal-history-panel{margin-top:0}
#thermal-history-panel>summary{min-height:44px;margin-bottom:0;padding-block:.5rem}
#thermal-history-panel:not([open]){padding-block:.625rem}
#thermal-history-panel[open]>summary{margin-bottom:1rem}
@media(max-width:480px){main{padding-top:1rem}.site-header{padding-inline:.8rem}}

/* Shared hosted Lab presentation. Engineering values remain Python-owned. */
:root{font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:16px;line-height:1.55;--ink:#183544;--muted:#536d7b;--accent:#006979;--teal:#006979;--border:#ccd9df;--line:#ccd9df;--paper:#fff;--bg:#f3f6f7;--tint:#edf5f8}
body.formal-lab{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;line-height:1.55}
body.formal-lab *{box-sizing:border-box}
header.lab-site-header{background:#173845;color:#fff;padding:1.4em 1.5em;border:0;font:16px/1.55 Inter,"Segoe UI",Arial,sans-serif}
.lab-site-header .lab-header-inner{max-width:1132px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:1em}
.lab-site-header .lab-heading{min-width:0;flex:1 1 280px}
.lab-site-header .eyebrow{font-family:inherit;font-size:.72em;line-height:1.55;letter-spacing:.16em;font-weight:500;color:#d0e0e5;margin:0 0 11.2px}
.lab-site-header h1{font-family:inherit;font-size:clamp(28.8px,3vw,41.6px);font-weight:700;line-height:1.2;letter-spacing:normal;color:#fff;margin:0 0 7.2px;overflow-wrap:anywhere}
.lab-site-header .lab-subtitle{font-size:1em;line-height:1.55;margin:0;color:#fff;overflow-wrap:anywhere}
.lab-site-header .lab-header-navigation{min-width:0;flex:0 1 58%;max-width:100%}
.lab-site-header :is(nav,[role="navigation"]){display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.5em;margin:0;padding:0}
.lab-site-header :is(nav,[role="navigation"]) a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:8.8px 12.8px;border:1px solid #567481;border-radius:6px;background:transparent;color:#fff;text-decoration:none;font-size:.95em;font-weight:400;overflow-wrap:anywhere}
.lab-site-header :is(nav,[role="navigation"]) a[aria-current]{background:#286070}
.lab-site-header .lab-header-status{min-height:1.55em;margin-top:.5em;text-align:right}
body.formal-lab #freshness{color:#d9ecf2;font-size:.85rem;line-height:1.5;min-width:0;overflow-wrap:anywhere}
body.formal-lab #freshness[data-state="error"]{color:#ffd2c9}
body.formal-lab #freshness[data-state="stale"]{color:#fce0a7}
body.formal-lab>main,body.formal-lab>main.wrap{width:100%;max-width:1180px;min-width:0;margin:auto;padding:1.5rem 1.5rem 3rem}
body.formal-lab>main>:first-child{margin-top:0}
body.formal-lab :is(.panel,.card){min-width:0;margin:1.2rem 0;padding:1.4rem;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 2px 5px #122e3e05}
body.formal-lab :is(h2,h3,h4){font-family:inherit;color:var(--ink);overflow-wrap:anywhere}
body.formal-lab h2,body.formal-lab .stage-header h2{font-size:1.35rem;font-weight:700;line-height:1.35;letter-spacing:normal}
body.formal-lab h3{font-size:1.1rem;font-weight:700;line-height:1.4}
body.formal-lab :is(p,li){line-height:1.55;overflow-wrap:anywhere}
body.formal-lab .card>p{font-size:.94rem;color:var(--muted)}
body.formal-lab main :is(label,.form-label){font-family:inherit;font-size:.9rem;font-weight:600;line-height:1.5;min-width:0}
body.formal-lab main label span{font-size:.8rem}
body.formal-lab main :is(input,select,textarea){font-family:inherit;font-size:.95rem;line-height:1.5;min-width:0;max-width:100%;min-height:44px;padding:.62rem .7rem;border:1px solid #acbec7;border-radius:5px;color:var(--ink);background:#fff}
body.formal-lab main :is(input[type="checkbox"],input[type="radio"]){width:20px;min-height:20px;height:20px;padding:0;flex-shrink:0}
body.formal-lab main input[type="range"]{padding:0;background:transparent;border:0}
body.formal-lab main textarea{font-family:Consolas,monospace;font-size:.88rem}
body.formal-lab main :is(button,.file-button){display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.45;min-height:44px;max-width:100%;padding:.6rem .9rem;border:1px solid #bccdd5;border-radius:6px;background:#fff;color:#244757;white-space:normal;overflow-wrap:anywhere;cursor:pointer;text-align:center}
body.formal-lab main button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
body.formal-lab main :is(button,.file-button):not(:disabled):hover{background:#edf4f6;border-color:#80a8b5}
body.formal-lab main button.primary:not(:disabled):hover{background:#005665;border-color:#005665}
body.formal-lab main button:disabled{opacity:1;background:#eef2f4;border-color:#dae2e6;color:#71838d;cursor:default;box-shadow:none}
body.formal-lab .study-control-card{gap:1rem}
body.formal-lab .study-tools .actions{gap:.6rem}
body.formal-lab .study-tools strong{font-size:.95rem}
body.formal-lab .study-control-card>.persistence-tools{padding:1rem;background:#f7f9fa;border:1px solid #dce5e9;border-radius:8px;gap:.8rem}
body.formal-lab .persistence-tools>.actions{gap:.6rem;justify-content:flex-start}
body.formal-lab .cloud-input-tools{align-items:flex-end}
body.formal-lab .persistence-tools label.file-button{flex:0 1 auto;width:auto;margin:0}
body.formal-lab .file-button:has(input[type="file"]){flex-direction:column}
body.formal-lab .persistence-tools label:not(.file-button){font-size:.85rem;color:var(--muted)}
body.formal-lab .application-sync button{flex:0 1 auto}
body.formal-lab .application-sync span,body.formal-lab .help{font-size:.875rem;line-height:1.55}
body.formal-lab .steps a{font-size:.85rem;line-height:1.45;min-height:48px}
body.formal-lab .pill{font-size:.75rem}
body.formal-lab :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #73b8c6;outline-offset:2px}
body.formal-lab .file-button:focus-within{outline:3px solid #73b8c6;outline-offset:2px}
body.formal-lab .notice{border:1px solid #bfd4dc;border-left:1px solid #bfd4dc;background:#edf5f8;color:#244757;padding:.8rem 1rem;border-radius:6px}
body.formal-lab summary{min-height:44px;line-height:1.55;overflow-wrap:anywhere}
body.formal-lab .stage-number{font-family:inherit;font-weight:700}
body.formal-lab :is(.metrics strong,.hero-result>strong,.evaluation strong){font-family:inherit}
body.formal-lab #thermal-history-panel{margin-top:0}
body.formal-lab #thermal-history-panel>summary{min-height:44px;margin-bottom:0;padding-block:.5rem}
body.formal-lab #thermal-history-panel:not([open]){padding-block:.625rem}
body.formal-lab #thermal-history-panel[open]>summary{margin-bottom:1rem}
@media(max-width:800px){.lab-site-header .lab-header-inner{align-items:flex-start;flex-direction:column}.lab-site-header .lab-heading{flex:0 1 auto}.lab-site-header .lab-header-navigation{flex:0 1 auto;width:100%}.lab-site-header :is(nav,[role="navigation"]){justify-content:flex-start}.lab-site-header .lab-header-status{text-align:left}}
@media(max-width:480px){header.lab-site-header{padding:1.2em .8em}body.formal-lab>main,body.formal-lab>main.wrap{padding:1rem .8rem 2rem}body.formal-lab :is(.panel,.card){padding:1rem}body.formal-lab h2,body.formal-lab .stage-header h2{font-size:1.2rem}body.formal-lab main :is(input,select,textarea){font-size:1rem}}
@media(max-width:600px){body.formal-lab .study-tools>.actions,body.formal-lab .persistence-tools>div{width:100%}body.formal-lab .study-control-card .actions>:is(button,.file-button){flex:1 1 100%;width:100%}body.formal-lab .persistence-tools>div:first-child>:is(button,label){flex:1 1 100%;width:100%}body.formal-lab .application-sync button{width:100%}}
@media (max-width: 480px) {
  .lab-site-header .lab-header-navigation .local-lab-links {
    display: grid;
    grid-template-columns: minmax(44px, .65fr) repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .lab-site-header .lab-header-navigation .local-lab-links a {
    min-width: 0;
    padding-inline: 4px;
    text-align: center;
  }
}
@media(prefers-reduced-motion:reduce){body.formal-lab *{scroll-behavior:auto;transition:none}}
#th-output .math-scroll{max-width:100%;min-width:0;overflow-x:auto;padding-block:.35rem}
#th-output details{min-width:0;max-width:100%}

#lsv-output,#lsv-output .lsv-defense,#lsv-formula{min-width:0;max-width:100%}#lsv-output .math-scroll{max-width:100%;overflow-x:auto}#lsv-output pre{max-width:100%;overflow-x:auto;font-size:12px}#lsv-output .chart svg{display:block;width:100%;height:auto}#lsv-output .table-scroll{max-width:100%;overflow-x:auto}
