:root{
  color-scheme:dark;
  --bg:#07151c;
  --bg2:#0a1c24;
  --panel:#0d2029;
  --panel-hi:#112a34;
  --line:rgba(172,214,221,.12);
  --line-strong:rgba(172,214,221,.2);
  --text:#e9f3f4;
  --muted:#91a9b0;
  --faint:#627b84;
  --ice:#83e7f3;
  --ice-strong:#b5f5fb;
  --accent:#54d6d5;
  --accent-dark:#1a777e;
  --gold:#d9b77b;
  --coral:#eaa18b;
  --radius:14px;
  --shadow:0 20px 50px rgba(0,0,0,.25);
}
*{box-sizing:border-box}
html,body{margin:0;min-width:320px;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{min-height:100vh}
button,input,summary{font:inherit}
button{color:inherit}
.app{min-height:100vh;height:100vh;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:64px minmax(0,1fr) 34px;overflow:hidden;background:radial-gradient(ellipse at 28% -20%,rgba(39,103,119,.22),transparent 48%),linear-gradient(145deg,#07151c,#091922 55%,#08161d)}
body.embed-mode{height:100vh;height:100dvh;overflow:hidden}
body.embed-mode .app{height:100vh;height:100dvh;min-height:0}
.topbar{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:20px;padding:0 22px;border-bottom:1px solid var(--line);background:rgba(7,21,28,.92);z-index:3}
.brand-lockup,.topbar-right,.toolbar{display:flex;align-items:center}
.brand-lockup{gap:12px;min-width:0}
.brand-mark{width:34px;height:34px;border:1px solid rgba(131,231,243,.34);border-radius:10px;display:flex;align-items:center;justify-content:center;gap:3px;transform:rotate(0deg);background:linear-gradient(145deg,rgba(83,214,213,.13),rgba(131,231,243,.025));box-shadow:inset 0 0 18px rgba(83,214,213,.08)}
.brand-mark span{display:block;width:3px;border-radius:4px;background:var(--ice);box-shadow:0 0 8px rgba(131,231,243,.6)}
.brand-mark span:nth-child(1){height:11px;opacity:.6}.brand-mark span:nth-child(2){height:19px}.brand-mark span:nth-child(3){height:14px;opacity:.75}
.brand-copy{min-width:0}.eyebrow,.section-kicker{font-size:9px;letter-spacing:.17em;font-weight:800;color:#77939c;line-height:1.3}
.brand-title{margin-top:4px;font-size:13px;font-weight:780;letter-spacing:.12em;white-space:nowrap}.brand-title span{color:var(--accent);padding:0 3px}
.topbar-right{min-width:0;gap:18px}.exhibit-state{display:flex;align-items:center;gap:8px;font-size:9px;font-weight:800;letter-spacing:.13em;color:#a6c1c6;white-space:nowrap}
.state-dot,.live-pip i,.caption-pulse{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px rgba(84,214,213,.65)}
.state-dot.blocked{background:var(--coral);box-shadow:0 0 12px rgba(234,161,139,.55)}
.toolbar{gap:6px;min-width:0;justify-content:flex-end}
.tool-button,.quality-button{height:34px;border:1px solid var(--line-strong);background:rgba(16,42,52,.78);border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 11px;font-size:11px;font-weight:700;cursor:pointer;transition:background .22s ease,border-color .22s ease,transform .22s ease}
.tool-button:hover,.quality-button:hover{background:#173743;border-color:rgba(131,231,243,.45)}
.tool-button:active,.quality-button:active,.preset-button:active{transform:translateY(1px)}
.tool-button:focus-visible,.quality-button:focus-visible,.preset-button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--ice);outline-offset:3px}
.tool-button.primary{background:linear-gradient(135deg,#1d777d,#15545f);border-color:rgba(131,231,243,.38);color:#f2ffff;min-width:88px}
.tool-button.primary:hover{background:linear-gradient(135deg,#258a90,#1b6872)}
.tool-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tool-button.primary svg{fill:currentColor;stroke:none}
.tool-button.icon-only{width:34px;padding:0}
.quality-button{padding:0 10px;color:#a6c7cb;font-size:9px;letter-spacing:.13em}
.quality-led{width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px rgba(84,214,213,.7)}
.quality-button[aria-pressed="false"] .quality-led{background:#d4a66e;box-shadow:0 0 8px rgba(212,166,110,.6)}
.workbench{display:grid;grid-template-columns:minmax(0,1fr) 370px;min-width:0;width:100%;min-height:0;overflow:hidden}
.stage{position:relative;min-width:0;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 48% 50%,rgba(26,79,91,.16),transparent 64%),linear-gradient(155deg,#091c24,#07151c 72%);border-right:1px solid var(--line)}
#scene{display:block;width:100%;height:100%;touch-action:pan-y}
.stage-topline,.stage-bottomline{position:absolute;left:20px;right:20px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
.stage-topline{top:16px}.stage-bottomline{bottom:76px}
.stage-chip{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid rgba(131,231,243,.18);border-radius:7px;background:rgba(8,27,35,.68);font-size:9px;font-weight:800;letter-spacing:.14em;color:#b2d0d4;backdrop-filter:blur(8px)}
.chip-ring{width:7px;height:7px;border:1px solid var(--ice);border-radius:50%;box-shadow:0 0 10px rgba(131,231,243,.5)}
.stage-scale{font-size:9px;letter-spacing:.14em;color:#708b93;font-weight:750}
.flow-legend{display:flex;align-items:center;gap:8px;font-size:9px;letter-spacing:.12em;color:#92b5bb;font-weight:750}
.legend-line{display:inline-block;width:24px;height:2px;background:var(--ice);box-shadow:0 0 8px rgba(131,231,243,.7);position:relative}
.legend-line:after{content:"";position:absolute;right:-1px;top:-3px;border-left:5px solid var(--ice);border-top:4px solid transparent;border-bottom:4px solid transparent}
.stage-coordinates{font-size:9px;letter-spacing:.12em;color:#718d96;font-weight:750}.stage-coordinates span{padding:0 7px;color:var(--accent)}
.stage-note{position:absolute;top:57px;left:20px;max-width:290px;font-size:11px;line-height:1.5;color:#c3dadd;text-shadow:0 1px 8px #07151c;pointer-events:none}
.stage-steps{position:absolute;bottom:16px;left:20px;right:20px;display:flex;align-items:center;justify-content:center;gap:clamp(8px,2.4vw,28px);padding:10px 14px;border:1px solid rgba(146,196,204,.11);border-radius:11px;background:rgba(8,25,33,.78);backdrop-filter:blur(10px);pointer-events:none}
.stage-steps div{display:flex;flex-direction:column;gap:3px;min-width:0}.stage-steps span{font-size:8px;letter-spacing:.16em;color:#68858e;font-weight:800}.stage-steps strong{font-size:10px;color:#c6dfe2;font-weight:700;white-space:nowrap}.stage-steps i{font-style:normal;color:#4abec4;font-size:14px}
.control-rail{min-height:0;overflow-y:auto;overscroll-behavior:contain;background:linear-gradient(180deg,#0b1e27,#0a1a22);scrollbar-width:thin;scrollbar-color:#25434c transparent}
.panel{padding:18px 18px 16px;border-bottom:1px solid var(--line)}
.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}
.panel-heading h1,.panel-heading h2{font-size:15px;line-height:1.25;letter-spacing:-.02em;margin:5px 0 0;font-weight:720;color:#e8f3f4}
.live-pip{display:flex;align-items:center;gap:6px;font-size:8px;font-weight:850;letter-spacing:.14em;color:#77c8c7;padding-top:5px}.live-pip i{display:block;width:5px;height:5px}
.readout-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.readout-card{min-height:69px;padding:10px 11px;border:1px solid rgba(164,206,213,.11);border-radius:10px;background:linear-gradient(145deg,rgba(20,48,58,.72),rgba(11,31,40,.9));overflow:hidden}
.readout-card.featured{grid-column:1 / -1;min-height:84px;background:linear-gradient(115deg,rgba(25,75,83,.54),rgba(13,37,47,.95));border-color:rgba(84,214,213,.22)}
.readout-label{display:flex;align-items:center;justify-content:space-between;gap:5px;color:#8ca8ae;font-size:8px;letter-spacing:.12em;font-weight:800;white-space:nowrap}
.readout-label span{font-size:7px;letter-spacing:.08em;color:#5f8790}
.readout-value{margin-top:6px;color:#effbfc;font-size:21px;line-height:1;font-weight:720;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.readout-value small{font-size:10px;letter-spacing:0;color:#9db9be;font-weight:650;margin-left:2px}
.readout-track{height:3px;margin-top:9px;background:rgba(126,174,183,.12);border-radius:4px;overflow:hidden}
.readout-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#39aeb6,#a1eff4);border-radius:4px;box-shadow:0 0 9px rgba(84,214,213,.6);transition:width .18s linear}
.caption-block{margin-top:11px;padding:11px 12px;border-left:2px solid var(--accent);background:rgba(18,51,60,.44);border-radius:0 9px 9px 0}
.caption-marker{display:flex;align-items:center;gap:7px;font-size:8px;font-weight:850;letter-spacing:.14em;color:#81d6d8}
.caption-pulse{width:5px;height:5px}
.caption-block p{margin:6px 0 0;color:#b8cdd1;font-size:10px;line-height:1.55}
.check-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:11px;padding-top:10px;border-top:1px solid var(--line)}
.check-row>div:first-child{display:flex;flex-direction:column;gap:3px}.check-title{font-size:8px;letter-spacing:.15em;font-weight:850;color:#89a7ae}.check-subtitle{font-size:9px;color:#69838b}.check-result{font-size:15px;font-weight:750;color:#bceef0;font-variant-numeric:tabular-nums}.check-result small{font-size:8px;color:#75949b;font-weight:650;margin-left:4px}
.compact-heading{align-items:center;margin-bottom:11px}.compact-heading h2{margin-top:4px}.assumption-tag{font-size:7px;letter-spacing:.12em;color:#8b9d8e;border:1px solid rgba(199,184,126,.2);background:rgba(199,184,126,.07);padding:5px 7px;border-radius:5px;white-space:nowrap;font-weight:800}
.preset-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;margin-bottom:15px}
.preset-button{min-width:0;min-height:52px;display:flex;align-items:center;gap:6px;padding:7px 7px;border:1px solid rgba(164,206,213,.12);border-radius:8px;background:rgba(16,40,49,.6);text-align:left;cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease}
.preset-button:hover{background:rgba(26,61,70,.7);border-color:rgba(131,231,243,.3)}
.preset-button.active{background:rgba(29,83,88,.48);border-color:rgba(84,214,213,.42);box-shadow:inset 0 0 0 1px rgba(84,214,213,.07)}
.preset-button span:last-child{display:flex;flex-direction:column;gap:3px;min-width:0}.preset-button b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d4e6e8}.preset-button small{font-size:8px;color:#7e9aa1;white-space:nowrap}
.preset-mark{flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#5dd8d4;box-shadow:0 0 8px rgba(93,216,212,.6)}.preset-mark.dry{background:#e2a27f;box-shadow:0 0 8px rgba(226,162,127,.55)}.preset-mark.pore{background:#a7a2e8;box-shadow:0 0 8px rgba(167,162,232,.55)}
.sliders{display:grid;grid-template-columns:1fr 1fr;gap:13px 14px}
.slider-control{min-width:0}.slider-heading{display:flex;align-items:baseline;justify-content:space-between;gap:5px;margin-bottom:7px}.slider-heading label{font-size:9px;color:#c3d6d9;font-weight:680}.slider-heading output{font-size:8px;color:#83dadd;white-space:nowrap;font-variant-numeric:tabular-nums}
input[type=range]{display:block;width:100%;height:15px;margin:0;background:transparent;cursor:pointer;accent-color:var(--accent)}
input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:4px;background:linear-gradient(90deg,#277e86,#35535c)}
input[type=range]::-moz-range-track{height:3px;border-radius:4px;background:linear-gradient(90deg,#277e86,#35535c)}
input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;margin-top:-4.5px;border-radius:50%;background:#b7f3f4;border:2px solid #1d626b;box-shadow:0 0 0 3px rgba(84,214,213,.13),0 0 10px rgba(84,214,213,.4)}
input[type=range]::-moz-range-thumb{width:9px;height:9px;border-radius:50%;background:#b7f3f4;border:2px solid #1d626b;box-shadow:0 0 0 3px rgba(84,214,213,.13),0 0 10px rgba(84,214,213,.4)}
.slider-hints{display:flex;justify-content:space-between;gap:4px;margin-top:2px;font-size:6.5px;letter-spacing:.09em;color:#5f7a83;font-weight:750}
.regime-readout{display:flex;align-items:center;gap:8px;margin-top:16px;padding:9px 10px;border:1px solid rgba(131,231,243,.14);border-radius:8px;background:rgba(17,47,57,.55)}
.regime-readout>span:first-child{font-size:8px;letter-spacing:.13em;color:#718d95;font-weight:850}.regime-readout strong{font-size:9px;letter-spacing:.09em;color:#a8e9e9}.regime-arrow{margin-left:auto;color:var(--accent);font-size:13px}
.science-panel{padding:0 18px 17px}
.science-panel summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0 1px;cursor:pointer}.science-panel summary::-webkit-details-marker{display:none}.science-panel summary>span:first-child{display:flex;flex-direction:column;gap:4px}.science-panel summary b{font-size:13px;color:#dcebed}.chevron{color:#83cbd0;font-size:17px;transition:transform .2s ease}.science-panel[open] .chevron{transform:rotate(180deg)}
.science-content{padding-top:13px}.science-lead{font-size:10px;line-height:1.6;color:#a8c1c6;margin:0 0 13px}
.equation-block{padding:10px 11px;margin:7px 0;border:1px solid rgba(164,206,213,.1);border-radius:8px;background:rgba(12,34,43,.65)}
.equation-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:7px;letter-spacing:.13em;font-weight:850;color:#78979f}.equation-label span{color:#75c6ca}.equation-block code{display:block;margin-top:8px;color:#d8f6f6;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;white-space:normal}.equation-block code+code{margin-top:5px}.equation-block p{font-size:9px;line-height:1.55;color:#8faab0;margin:7px 0 0}
.constants-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:11px}.constants-grid div{display:flex;flex-direction:column;gap:4px;padding:8px;border:1px solid rgba(164,206,213,.09);border-radius:7px;background:rgba(12,33,42,.56)}.constants-grid span{font-size:8px;color:#8ca7ad}.constants-grid b{font-size:9px;color:#cce1e4;font-weight:680}.constants-grid i{font-style:normal;font-size:7px;color:#78c6c7;margin-left:3px;text-transform:uppercase;letter-spacing:.06em}
.limitations{margin-top:12px;padding:10px 11px;border-left:2px solid #c9a977;background:rgba(116,91,51,.1);border-radius:0 8px 8px 0}.limitations b{font-size:9px;color:#d7c29a;letter-spacing:.04em}.limitations p{font-size:9px;line-height:1.6;color:#b3b0a1;margin:6px 0 0}.disclaimer{font-size:8px;line-height:1.5;color:#829ba1;margin:12px 0 0}
.footerbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px;border-top:1px solid var(--line);background:#07141b;color:#6e8991;font-size:8px;letter-spacing:.12em;font-weight:750;white-space:nowrap}
.footerbar span:first-child{color:#82aeb4}.keyboard-hint i{font-style:normal;color:#3b6971;padding:0 4px}
@media(max-width:1080px) and (min-width:761px){.workbench{grid-template-columns:minmax(0,1fr) 345px}.topbar{padding:0 16px}.stage-steps{gap:12px}.stage-steps strong{font-size:9px}.panel{padding-left:15px;padding-right:15px}.science-panel{padding-left:15px;padding-right:15px}}
@media(max-width:760px){
  .app{grid-template-rows:58px minmax(0,1fr) 30px}
  .topbar{padding:0 11px;gap:8px}.brand-lockup{gap:8px}.brand-mark{width:29px;height:29px;border-radius:8px}.eyebrow{font-size:7px;letter-spacing:.13em}.brand-title{font-size:10px;letter-spacing:.09em}.topbar-right{gap:8px}.exhibit-state{display:none}.toolbar{gap:4px}.tool-button,.quality-button{height:31px}.tool-button.primary{min-width:68px;padding:0 8px;font-size:10px}.tool-button.icon-only{width:31px}.tool-button.icon-only svg{width:14px;height:14px}.quality-button{padding:0 7px;font-size:8px}
  .workbench{display:flex;flex-direction:column;min-width:0;width:100%;min-height:0;overflow:hidden}.stage{flex:0 0 clamp(270px,40vh,350px);min-height:270px;border-right:0;border-bottom:1px solid var(--line)}.stage-topline{left:12px;right:12px;top:10px}.stage-bottomline{left:12px;right:12px;bottom:64px}.stage-chip{font-size:8px;padding:6px 8px}.stage-scale,.stage-coordinates{font-size:7px}.stage-note{top:43px;left:13px;max-width:235px;font-size:9px}.stage-steps{left:10px;right:10px;bottom:9px;gap:8px;padding:8px 7px}.stage-steps span{font-size:6px}.stage-steps strong{font-size:8px}.stage-steps i{font-size:11px}
  .control-rail{width:100%;min-width:0;flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto}.panel{padding:14px 13px 13px}.panel-heading h1,.panel-heading h2{font-size:14px}.readout-card{min-height:63px;padding:9px}.readout-card.featured{min-height:77px}.readout-value{font-size:19px}.readout-label{font-size:7px}.readout-label span{font-size:6px}.caption-block{padding:9px 10px}.caption-block p{font-size:9px}.check-subtitle{font-size:8px}.compact-heading{margin-bottom:10px}.preset-button{min-height:48px;padding:6px 5px;gap:5px}.preset-button b{font-size:8px}.preset-button small{font-size:7px}.sliders{gap:12px 11px}.slider-heading label{font-size:8px}.slider-heading output{font-size:7px}.slider-hints{font-size:6px}.science-panel{padding:0 13px 14px}.science-panel summary{padding-top:13px}.footerbar{padding:0 10px;font-size:6.5px;letter-spacing:.08em}.footerbar span:nth-child(2){display:none}
}
@media(max-width:390px){.brand-title{font-size:9px}.toolbar{gap:3px}.tool-button.primary{min-width:54px;padding:0 5px;font-size:9px}.tool-button.icon-only{width:26px;height:29px}.quality-button{height:29px;padding:0 4px;font-size:7px}.quality-led{width:5px;height:5px}.readout-label{letter-spacing:.08em}.preset-button b{font-size:7px}.preset-button small{font-size:6px}.stage-steps{gap:5px}.stage-steps strong{font-size:7px}.footerbar{font-size:6px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
