/* Native-density study workspace, aligned with Sun Hours. No scaled pages/canvases. */
.study-shell{height:calc(100dvh - var(--pc-ui-shell-height,64px));min-height:0;max-width:none;margin:0!important;padding:6px 10px!important;display:grid;grid-template-rows:auto minmax(0,1fr);gap:6px;box-sizing:border-box;font-size:12px;color:var(--ink)}
.study-shell :is(.env-body,.ss-body,.study-local-body){display:grid!important;grid-template-columns:clamp(232px,22vw,290px) minmax(0,1fr) clamp(224px,23vw,310px)!important;gap:8px;min-width:0;min-height:0;height:auto!important}
.study-shell .study-settings,.study-shell .study-results{position:relative;overflow:auto;overscroll-behavior:contain;min-width:0;min-height:0;max-height:none!important;background:var(--card);border:1px solid var(--line);border-radius:5px;padding:8px;scrollbar-gutter:stable;scroll-padding-top:45px}
.study-shell .study-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;gap:0}
.study-shell :is(.env-view,.ss-view,.study-local-stage){position:relative;flex:1;min-height:0!important;margin:0;background:var(--view);border:1px solid var(--line);border-radius:5px;overflow:hidden}
.study-shell :is(#env-canvas,#ss-canvas,#lc-canvas){position:absolute!important;inset:0;width:100%!important;height:100%!important;min-height:0!important}
.study-shell .study-results-heading{font:650 13px var(--sans,system-ui);margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.study-panel-nav{position:sticky;top:-8px;z-index:6;display:flex;gap:4px;background:var(--card);padding:6px 0 8px;border-bottom:1px solid var(--line);margin-bottom:8px}
.study-panel-nav button,.study-nav button{font:500 12px var(--sans,system-ui);min-height:28px;padding:4px 8px;color:var(--ink);background:var(--card);border:1px solid var(--line2);border-radius:4px;cursor:pointer}
.study-panel-nav button:focus-visible,.study-nav button:focus-visible,.study-port:focus-visible{outline:2px solid var(--btn,#d4322b);outline-offset:-2px}
.study-nav{position:absolute;z-index:5;top:6px;left:6px;right:6px;display:flex;justify-content:space-between;align-items:flex-start;gap:6px;pointer-events:none}.study-nav>div{display:flex;gap:3px;pointer-events:auto;flex-wrap:wrap}.study-nav button[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.study-stage{position:relative;overflow:hidden;min-width:0;min-height:0;background:var(--view)}.study-stage>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none;touch-action:none}
.study-port{position:absolute;inset:0;touch-action:none;outline:0}.study-stage[data-study-mode=split]>.study-port-plan{right:50%;border-right:1px solid var(--line2)}.study-stage[data-study-mode=split]>.study-port-persp{left:50%}.study-port[hidden]{display:none!important}
.study-navigation-hint{position:absolute;left:6px;right:6px;bottom:6px;pointer-events:none;background:var(--card);border:1px solid var(--line);border-radius:4px;padding:5px 7px;font-size:10px;line-height:1.4;color:var(--ink)}
.study-orientation{position:absolute;right:8px;top:48px;font:11px var(--mono,monospace);background:var(--card);color:var(--ink);padding:4px 6px;border-radius:3px;pointer-events:none}.study-tip{position:absolute;z-index:7;pointer-events:none;max-width:205px;white-space:normal;font:11px/1.4 var(--mono,monospace);padding:6px;background:var(--ink);color:var(--bg);border-radius:4px}.study-tip[hidden]{display:none!important}
.study-shell .env-legend,.study-shell .ss-legend{bottom:43px;max-height:68px;overflow:auto;pointer-events:auto;background:var(--card);font-size:10px}
.study-shell .study-old-tools{display:none}.study-shell .study-struct-tools{top:43px;right:auto;max-width:calc(100% - 65px);gap:3px}.study-shell .study-struct-tools span{display:none}.study-shell .study-struct-tools button{font-size:10px;padding:3px 5px;min-height:25px}
.study-chart-stage{height:100%;overflow:auto;overscroll-behavior:contain;background:var(--view);border:1px solid var(--line);border-radius:5px;padding:12px;scrollbar-gutter:stable;min-width:0}.study-chart-card{padding:10px;margin-bottom:10px;border:1px solid var(--line);background:var(--card);border-radius:5px}.study-chart-card h2,.study-chart-card h3{font-size:14px;margin:0 0 8px}.study-chart-card canvas{display:block;width:100%;height:auto}.study-chart-card .env-wind-rose{display:block;margin:auto;max-width:100%;width:300px}
.study-shell :is(.env-head,.ss-head,.study-local-head){padding:0!important;min-width:0;gap:6px}.study-shell :is(.env-head,.ss-head) :is(select,button){font-size:12px;min-height:28px}.study-shell :is(.env-head,.ss-head)>div:first-child{min-width:0;flex-basis:160px}.study-shell :is(.env-head,.ss-head) .tag{font-size:10px}.study-shell :is(.env-head,.ss-head) .note{font-size:10px}.study-shell :is(input,select){font-size:12px;min-height:28px;max-width:100%;min-width:0;padding:4px 6px}.study-shell input[type=checkbox]{min-height:0}.study-shell label{font-size:12px;line-height:1.45}.study-shell :is(p,.note){font-size:11px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}.study-shell .btn{font-size:12px;min-height:28px;padding:4px 7px}.study-shell :is(h2,h3){font-size:13px}.study-shell details summary{font-size:12px;cursor:pointer}.study-shell .grid{gap:6px}.study-shell [hidden]{display:none!important}
.study-local-head{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.study-local-head h1{font-size:14px!important;margin:0 10px 0 0}.study-local-head>a{font-size:12px}.study-local-head>.acts{margin-left:auto;display:flex;gap:6px}.study-local-head label{display:flex;align-items:center;gap:4px}.study-local-head select{max-width:180px}.study-local-intro{flex-basis:100%;margin:0;font-size:11px!important}.study-local-settings .card{border:0;padding:8px 0;margin:0!important;background:none}.study-local-settings .card h2{margin:4px 0 7px}.study-local-settings .grid.g2{grid-template-columns:minmax(0,1fr)}.study-local-settings #lc-daylight>.grid.g2{display:block}.study-local-settings .lc-material{grid-template-columns:minmax(0,1fr);gap:3px}.study-local-settings .lc-material>span{grid-column:auto}.study-local-settings .lc-material .f{margin:2px 0}.study-local-settings .lc-materials{max-height:230px}.study-local-settings #lc-audit{display:block}.study-local-settings pre{font-size:11px}.study-local-results .lc-table{max-height:none;overflow:auto}.study-local-results pre{white-space:pre-wrap;overflow-wrap:anywhere}.study-local-guide{border-block:1px solid var(--line);padding:10px 0}.study-local-results .acts{gap:4px;display:flex;flex-wrap:wrap}
@media(min-width:901px) and (max-width:1100px){.study-shell :is(.env-body,.ss-body,.study-local-body){grid-template-columns:225px minmax(0,1fr) 225px!important}.study-nav{flex-wrap:wrap}.study-nav button{padding:4px 5px;font-size:11px}.study-orientation{top:80px}.study-local-head select{max-width:140px}}
@media(max-width:900px){.study-shell{height:auto;min-height:calc(100dvh - var(--pc-ui-shell-height,64px))}.study-shell :is(.env-body,.ss-body,.study-local-body){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:440px auto auto}.study-shell .study-main{grid-row:1;min-height:400px}.study-shell .study-settings,.study-shell .study-results{max-height:65vh!important}.study-local-head>.acts{flex-wrap:wrap;margin-left:0}.study-local-head select{max-width:180px}.study-shell .study-main .ss-view{min-height:350px!important}.study-nav button{font-size:11px}}

.study-port{user-select:none;-webkit-user-select:none}.study-shell tr[aria-selected=true]{background:color-mix(in srgb,var(--btn) 20%,var(--card));outline:1px solid var(--btn)}
/* One study layout for every simulation (Sun Hours pattern): header, Settings|Export and Results|Charts tabs, view switch */
.study-shell .shbar.env-head,.study-shell .shbar.ss-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 4px 4px!important;border-bottom:1px solid var(--line);background:var(--bg);font-size:13px}
.study-shell .shbar .shname{font-size:16px;letter-spacing:-.02em;font-weight:700}
.study-shell .shbar .study-workflow .study-state{flex:1 0 100%;margin:0;color:var(--ink2);font-size:12px;line-height:1.5}
.study-shell .shbar .btn{font-size:12px;min-height:28px}
.study-shell .study-panel-nav.pc-fit-tabs{display:flex;gap:4px;flex-wrap:wrap}
.study-shell .study-panel-nav.pc-fit-tabs button{font:500 12px var(--sans,system-ui);padding:5px 8px;min-height:28px;border:1px solid var(--line,#ddd);border-radius:5px;background:var(--card,#fff);color:var(--ink,#222);cursor:pointer}
.study-shell .study-panel-nav.pc-fit-tabs button[aria-selected=true]{background:var(--accent-soft,#fbe9e5);border-color:var(--accent,#d8402a);color:var(--accent,#d8402a)}
.study-shell .study-tab-panel[hidden],.study-shell .study-chart-gallery[hidden]{display:none!important}
.study-shell .study-results[data-study-tab=charts]>:not(.study-panel-nav):not(.study-chart-gallery){display:none!important}
.study-shell .study-results[data-study-tab=results] :is(canvas,svg[role=img],.env-wind-rose,.env-mask){display:none!important}
.study-shell .study-chart-gallery figure{margin:0 0 14px}.study-shell .study-chart-gallery figcaption{font:600 12px var(--sans,system-ui);margin-bottom:6px}
.study-shell .study-export-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:6px 0 10px;border-bottom:1px solid var(--line)}.study-shell .study-export-actions h3{flex-basis:100%;margin:0;font-size:13px}.study-shell .study-export-actions .note{flex-basis:100%;margin:0}
.study-shell .study-modes{background:var(--fill,#ececef);border-radius:9px;padding:2px;gap:2px!important}
.study-shell .study-modes button{border:0!important;border-radius:7px;background:transparent!important;color:var(--ink)!important;font:500 12.5px var(--sans,system-ui);padding:4px 10px}
.study-shell .study-modes button[aria-pressed=true]{background:#fff!important;color:var(--blue,#2d6cdf)!important;box-shadow:0 1px 3px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.04)}
.study-shell .shbar .study-workflow{justify-content:flex-end}
.study-shell .shbar .study-workflow .study-state{flex:1 1 260px!important;order:-1}
.study-shell .shbar .study-workflow progress{order:-1}
/* Centre view and side panels exactly in the Sun Hours pattern */
.study-shell{padding:0!important;gap:0!important}
.study-shell .shbar.env-head,.study-shell .shbar.ss-head{padding:6px 16px!important}
.study-shell :is(.env-body,.ss-body){grid-template-columns:270px minmax(0,1fr) 250px!important;gap:0!important}
.study-shell .study-settings,.study-shell .study-results{border:0!important;border-radius:0!important;background:var(--bg)!important;padding:6px!important}
.study-shell .study-settings{border-right:1px solid var(--line)!important}.study-shell .study-results{border-left:1px solid var(--line)!important}
.study-shell .study-settings>.study-tab-panel{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:8px}
.study-shell .study-results>:not(.study-panel-nav){background:var(--card);border-left:1px solid var(--line);border-right:1px solid var(--line);padding:4px 8px;margin:0}
.study-shell .study-results>.study-panel-nav+*{border-top:1px solid var(--line);border-radius:8px 8px 0 0;padding-top:8px}
.study-shell .study-results>:last-child{border-bottom:1px solid var(--line);border-radius:0 0 8px 8px;padding-bottom:8px}
.study-shell .study-results>.study-chart-gallery[hidden]{display:none!important}
.study-shell .study-panel-nav{border-bottom:0!important;background:transparent!important;margin-bottom:6px}
.study-shell :is(.env-view,.ss-view){border:0!important;border-radius:0!important}
.study-shell .study-stage{--view:#e9ecef}
.study-shell .study-modes{background:#fff!important;border:1px solid var(--line2,#d5d8dc);border-radius:8px!important;padding:3px!important;box-shadow:0 1px 2px rgba(0,0,0,.04);margin:6px}
.study-shell .study-modes button[aria-pressed=true]{background:#e8effc!important;color:var(--blue,#2d6cdf)!important;box-shadow:none}
.study-shell .study-nav-tools,.study-shell .study-orientation{display:none!important}
.study-shell .study-navigation-hint{left:12px!important;right:auto!important;bottom:12px!important;max-width:min(520px,60%);background:#fff!important;border:1px solid var(--line)!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(0,0,0,.08);font:11px/1.4 var(--mono,ui-monospace,monospace)!important;padding:6px 10px!important}
.study-shell :is(.env-legend,.ss-legend){left:auto!important;right:12px!important;bottom:12px!important;max-width:min(460px,45%);background:#fff!important;border:1px solid var(--line)!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(0,0,0,.08);font:11px/1.4 var(--mono,ui-monospace,monospace)!important;padding:6px 10px!important}
.study-shell .study-struct-tools{top:50px!important;left:6px!important;margin:6px;background:#fff;border:1px solid var(--line2,#d5d8dc);border-radius:8px;padding:3px!important;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.study-shell .study-struct-tools button{border:0!important;background:transparent!important;border-radius:6px;font:500 11.5px var(--sans,system-ui)!important}
