.prestudy-shell { --ps-border:#30383b; --ps-card:#151b1d; --ps-muted:#9aa6aa; --ps-solar:#ffb32c; --ps-load:#ff7548; --ps-battery:#62d7cf; padding:14px; display:grid; gap:12px; background:#0e1214; color:#eef3f0; }
.prestudy-toolbar,.prestudy-actions,.prestudy-source { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.prestudy-toolbar { justify-content:space-between; }
.prestudy-title { display:grid; gap:3px; }
.prestudy-title strong { font-size:18px; }
.prestudy-title small,.prestudy-help,.prestudy-muted { color:var(--ps-muted); font-size:12px; line-height:1.45; }
.prestudy-badge { display:inline-flex; align-items:center; min-height:22px; padding:2px 8px; border:1px solid #4e8070; border-radius:999px; background:#172421; color:#bfffe9; font-size:11px; }
.prestudy-badge.warning { border-color:#7d6418; background:#292108; color:#ffd76b; }
.prestudy-calc-status { min-width:72px; margin-left:auto; color:#8d999d; font-size:11px; text-align:right; }
.prestudy-calc-status.active { color:#7be0dc; }
.prestudy-notice { padding:9px 11px; border:1px solid #7d6418; border-radius:6px; background:#251f0d; color:#f6d983; font-size:12px; }
.prestudy-grid { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:12px; align-items:start; }
.prestudy-controls,.prestudy-output { display:grid; gap:10px; }
.prestudy-card { min-width:0; border:1px solid var(--ps-border); border-radius:8px; background:var(--ps-card); overflow:hidden; }
.prestudy-card h3 { margin:0; padding:10px 12px; border-bottom:1px solid var(--ps-border); color:#ffb35b; font-size:12px; letter-spacing:.04em; text-transform:uppercase; }
.prestudy-card-body { padding:11px 12px; display:grid; gap:10px; }
.prestudy-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.prestudy-field { display:grid; gap:4px; min-width:0; color:#c7d1d4; font-size:11px; }
.prestudy-field.wide { grid-column:1/-1; }
.prestudy-field input,.prestudy-field select,.prestudy-field textarea,.prestudy-toolbar select { box-sizing:border-box; width:100%; min-width:0; padding:7px 8px; border:1px solid #465054; border-radius:6px; background:#20272a; color:#eef3f0; }
.prestudy-location-map-shell { display:grid; gap:7px; }
.prestudy-location-map { position:relative; width:100%; min-height:250px; overflow:hidden; border:1px solid #30383b; border-radius:7px; background:#101517; }
.prestudy-location-map .prestudy-map-loading { position:absolute; inset:0; display:grid; place-items:center; padding:16px; color:var(--ps-muted); text-align:center; background:radial-gradient(circle at 50% 45%,#182326 0,#101517 62%); }
.prestudy-location-map.map-ready .prestudy-map-loading { display:none; }
.prestudy-location-map .maplibregl-canvas { outline:0; }
.prestudy-location-map .maplibregl-ctrl { color:#1c2528; }
.prestudy-location-map-shell p { margin:0; }
.prestudy-shell :focus-visible { outline:2px solid #7be0dc; outline-offset:2px; }
.prestudy-card > summary { cursor:pointer; padding:11px 12px; color:#ffb35b; font-size:12px; font-weight:700; text-transform:uppercase; }
.prestudy-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.prestudy-result { padding:13px; border:1px solid var(--ps-border); border-radius:8px; background:linear-gradient(145deg,#171d1f,#101517); }
.prestudy-result.recommended { border-color:#516b28; box-shadow:inset 0 2px #94c83d; }
.prestudy-result.offered { border-color:#3e6f88; box-shadow:inset 0 2px #5aa9ff; }
.prestudy-result.offered.warning { border-color:#8a6128; box-shadow:inset 0 2px #f0a340; }
.prestudy-result.technical { grid-column:1/-1; }
.prestudy-result h3 { margin:0 0 8px; color:#ffcf69; font-size:13px; }
.prestudy-big { color:#fff; font:700 24px/1.15 ui-monospace,SFMono-Regular,Consolas,monospace; }
.prestudy-metrics { margin-top:9px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.prestudy-metric { padding:7px; border-radius:5px; background:#101517; }
.prestudy-metric small { display:block; color:var(--ps-muted); font-size:9px; text-transform:uppercase; }
.prestudy-metric b { display:block; margin-top:2px; font-size:12px; }
.prestudy-editor { display:grid; gap:4px; }
.prestudy-offer-fields { margin-bottom:10px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; align-items:end; }
.prestudy-offer-fields button { grid-column:1/-1; }
.prestudy-chart-select { width:min(260px,100%); }
.prestudy-bars { display:grid; grid-template-columns:repeat(12,minmax(22px,1fr)); gap:4px; min-height:150px; align-items:end; }
.prestudy-bars.hours { grid-template-columns:repeat(24,minmax(16px,1fr)); min-height:180px; overflow-x:auto; }
.prestudy-bar { min-width:0; display:grid; grid-template-rows:minmax(95px,1fr) auto auto; gap:3px; text-align:center; font-size:9px; color:var(--ps-muted); }
.prestudy-bar input[type=range] { writing-mode:vertical-lr; direction:rtl; width:100%; min-width:0; height:100%; padding:0; accent-color:var(--ps-solar); }
.prestudy-bars.hours .prestudy-bar input[type=range] { accent-color:var(--ps-load); }
.prestudy-bar output { color:#dbe5e1; font-size:9px; }
.prestudy-chart { min-height:300px; padding:8px; }
.prestudy-chart svg { width:100%; height:300px; display:block; }
.prestudy-echart { width:100%; height:300px; }
.prestudy-chart .grid { stroke:#273033; stroke-width:1; }
.prestudy-chart .load { fill:none; stroke:var(--ps-load); stroke-width:2.2; }
.prestudy-chart .grid-exchange { fill:none; stroke:#5aa9ff; stroke-width:2.2; }
.prestudy-chart .solar { fill:rgba(255,179,44,.15); stroke:var(--ps-solar); stroke-width:2.2; }
.prestudy-chart .soc { fill:none; stroke:var(--ps-battery); stroke-width:2; stroke-dasharray:5 4; }
.prestudy-legend { display:flex; gap:12px; flex-wrap:wrap; color:var(--ps-muted); font-size:11px; }
.prestudy-legend i { display:inline-block; width:12px; height:3px; margin-right:4px; vertical-align:middle; }
.prestudy-table { width:100%; font-size:11px; }
.prestudy-table th,.prestudy-table td { padding:6px 8px; }
main.prestudy-mode { display:block; padding:10px 12px 18px; }
main.prestudy-mode #detail { display:none; }
main.prestudy-mode #prestudyPanel { max-height:none; }
@media (max-width:980px) { .prestudy-grid { grid-template-columns:1fr; } }
@media (max-width:650px) { .prestudy-results,.prestudy-form-grid { grid-template-columns:1fr; } .prestudy-field.wide { grid-column:auto; } .prestudy-bars { overflow-x:auto; } }
@media (prefers-reduced-motion:reduce) { .prestudy-shell * { scroll-behavior:auto!important; transition:none!important; } }
