:root{color-scheme:light;--bg:#f1f4f2;--panel:#fff;--ink:#172b2d;--muted:#617577;--line:#dce6e2;--accent:#147a60;--soft:#e3f3eb;--yellow:#a76b08;--shadow:0 8px 40px #173f2b05}html[data-theme=dark]{color-scheme:dark;--bg:#101a20;--panel:#17262c;--ink:#e9f5f0;--muted:#9cb5b7;--line:#30454a;--accent:#8de5bc;--soft:#233d35;--yellow:#f3c768;--shadow:none}@media(prefers-color-scheme:dark){html:not([data-theme=light]){color-scheme:dark;--bg:#101a20;--panel:#17262c;--ink:#e9f5f0;--muted:#9cb5b7;--line:#30454a;--accent:#8de5bc;--soft:#233d35;--yellow:#f3c768;--shadow:none}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}header{max-width:1440px;margin:auto;padding:28px 40px;display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid var(--line)}a{color:inherit}.brand{text-decoration:none;display:flex;gap:12px;align-items:center;font-size:21px;font-weight:750;letter-spacing:-.6px}.brand small{display:block;font-size:9px;letter-spacing:2px;font-weight:500;color:var(--muted);margin-top:3px}.mark{display:grid;place-items:center;width:44px;height:44px;background:var(--accent);color:var(--bg);border-radius:14px;font-size:34px}.theme{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:10px}select,button,input{font:inherit}select{padding:10px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--panel)}main{max-width:1440px;margin:auto;padding:34px 40px 20px}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:12px 0 30px}h1{font-size:clamp(30px,4vw,44px);line-height:1.13;letter-spacing:-1.7px;margin:12px 0}h2{font-size:21px;letter-spacing:-.5px;margin:8px 0 0}p{color:var(--muted);margin:10px 0}.eyebrow{color:var(--muted);font-size:10px;font-weight:700;letter-spacing:1.7px}.live,.chip{border:1px solid var(--line);border-radius:100px;padding:7px 12px;font-size:11px;white-space:nowrap}.live::before{content:'●';color:var(--accent);padding-right:8px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:var(--shadow)}.overview{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:20px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px}.side{display:grid;gap:20px}.flow{height:390px;position:relative;max-width:700px;margin:auto}.lines{position:absolute;width:100%;height:100%;overflow:visible}.lines path{stroke:var(--line);stroke-width:2;fill:none}.lines path.active{stroke:var(--accent);stroke-dasharray:6 8;animation:flow 3s linear infinite}.lines path.reverse{animation-direction:reverse}.lines circle{fill:var(--soft);stroke:var(--accent);stroke-width:1}.energy-node{position:absolute;display:flex;align-items:center;flex-direction:column;justify-content:center;text-align:center;background:var(--panel);min-width:120px;padding:9px 6px;transform:translate(-50%,-50%);border-radius:16px}.energy-node>span:not(.node-icon){font-size:12px;color:var(--muted)}.energy-node strong{font-size:25px;letter-spacing:-1px}.energy-node small{font-size:10px;color:var(--muted);max-width:150px}.node-icon{font-size:27px;color:var(--accent);line-height:1.2}.solar{top:17%;left:50%}.solar .node-icon{color:var(--yellow)}.grid{top:50%;left:16%}.battery{top:50%;left:84%}.home{top:84%;left:50%}.caption{font-size:11px;line-height:1.6}.soc{display:flex;align-items:baseline;gap:12px;margin:22px 0 12px}.soc strong{font-size:54px;line-height:1;letter-spacing:-3px}.soc span{font-size:12px;color:var(--muted)}progress{width:100%;height:10px;border:0;border-radius:10px;overflow:hidden;accent-color:var(--accent)}progress::-webkit-progress-bar{background:var(--line)}progress::-webkit-progress-value{background:var(--accent)}.battery-card p{font-size:12px;margin:16px 0 24px}.price-now{background:var(--soft)}.price-now>strong{display:block;font-size:36px;letter-spacing:-1px;margin-top:12px}.price-now p,.price-now small{font-size:12px;color:var(--muted)}.prices,.history,.sources{margin-top:20px}.segmented{display:flex;background:var(--bg);border-radius:12px;padding:4px;gap:4px}.segmented button,button.secondary{background:none;border:0;color:var(--muted);padding:9px 16px;border-radius:9px;cursor:pointer}.segmented button[aria-pressed=true]{background:var(--panel);color:var(--ink);box-shadow:0 2px 8px #0001}button{min-height:44px}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.chart{height:220px;margin:26px 0 10px;display:flex;align-items:stretch;gap:5px}.bar-column{flex:1;min-width:0;position:relative;display:flex;align-items:stretch;justify-content:center}.bar{position:absolute;left:0;right:0;background:var(--accent);opacity:.65;border-radius:5px 5px 0 0;min-height:2px}.bar.negative{background:var(--yellow)}.bar.now{opacity:1;outline:2px solid var(--ink);outline-offset:2px}.bar-label{position:absolute;bottom:0;font-size:10px;color:var(--muted)}.chart-empty{display:grid;place-items:center;width:100%;background:var(--bg);border-radius:12px;color:var(--muted)}.source-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:24px}.source{border:1px solid var(--line);padding:18px;border-radius:14px}.source strong{font-size:14px}.source p{font-size:12px}.status{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--yellow);margin-right:7px}.status.ok{background:var(--accent)}details{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}summary{cursor:pointer;color:var(--muted);min-height:36px;font-size:13px}.management{font-size:13px;max-width:750px}footer{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;font-size:11px;color:var(--muted);padding:24px 0}.text-button{border:0;background:none;color:var(--muted);padding:0;cursor:pointer}.notice{border:1px solid var(--yellow);border-radius:12px;padding:14px 18px;margin-bottom:20px;color:var(--yellow);font-size:13px}.login{max-width:500px;margin:8vh auto}.login input{width:100%;margin:8px 0 14px;border:1px solid var(--line);border-radius:10px;padding:14px;background:var(--bg);color:var(--ink)}.login label{font-size:12px}.login button{display:flex;justify-content:space-between;width:100%;background:var(--accent);color:var(--bg);border:0;padding:14px;border-radius:10px;cursor:pointer}.login form{margin-top:24px}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}td,th{padding:9px;border-bottom:1px solid var(--line)}.table-wrap{max-height:360px;overflow:auto}.history-chart{height:160px;margin:22px 0;color:var(--muted)}.history-chart svg{width:100%;height:100%;overflow:visible}.history-chart path{stroke:var(--accent);fill:none;stroke-width:2}.history-chart line{stroke:var(--line)}.history-chart text{fill:var(--muted);font-size:10px}#devices{font-size:12px;overflow-wrap:anywhere}code{font-size:12px;overflow-wrap:anywhere}[hidden]{display:none!important}@keyframes flow{to{stroke-dashoffset:-56}}@media(prefers-reduced-motion:reduce){.lines path.active{animation:none}}@media(max-width:850px){.overview{grid-template-columns:1fr}.side{grid-template-columns:1fr 1fr}.source-grid{grid-template-columns:1fr}.soc strong{font-size:44px}}@media(max-width:540px){header{padding:20px 18px}.brand{font-size:17px}.brand small{font-size:7px}.theme{font-size:0;gap:0}select{font-size:12px;max-width:116px}main{padding:24px 16px}.intro{display:block;margin:0 0 24px}.live{display:inline-block;margin-top:12px}.panel{padding:20px;border-radius:18px}.flow{height:330px}.energy-node{min-width:95px}.energy-node strong{font-size:22px}.energy-node small{max-width:100px;font-size:9px}.side{gap:12px}.side .panel{padding:17px}.side h2{font-size:17px}.side .eyebrow{font-size:8px}.soc{display:block}.soc span{display:block;margin-top:8px}.soc strong{font-size:40px}.price-now>strong{font-size:27px}.section-title{align-items:flex-start;flex-wrap:wrap}h2{font-size:20px}.chart{gap:3px;height:190px}.bar-label{font-size:9px}.caption{font-size:10px}.grid{left:14%}.battery{left:86%}.login{margin:30px auto}}
/* Compact cockpit: the primary overview fits a tablet viewport. */
header{padding:14px 28px}.brand{font-size:19px}.mark{width:38px;height:38px;border-radius:12px}main{padding:18px 28px 10px}.intro{margin:0 0 16px}.intro h1{font-size:25px;letter-spacing:-.9px;margin:4px 0 0}.panel{padding:19px;border-radius:20px}.section-title h2{font-size:19px;margin-top:4px}.node-icon{display:grid;place-items:center;width:54px;height:54px;margin-bottom:4px;background:linear-gradient(145deg,var(--soft),var(--panel));border:1px solid var(--line);border-radius:17px;box-shadow:0 5px 15px #00000008}.node-icon svg{width:39px;height:39px}.solar .node-icon{background:linear-gradient(145deg,#edc15e20,var(--panel))}.energy-node small{line-height:1.3}.energy-node{min-width:105px}.flow-caption{text-align:center}.weather{margin-top:16px}.weather-tomorrow{display:flex;align-items:center;gap:18px;padding:12px 0}.weather-tomorrow>div{display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 16px;flex:1}.weather-tomorrow strong{font-size:40px;grid-column:2;grid-row:1/3;line-height:1}.weather-tomorrow span,.weather-tomorrow small{font-size:12px;color:var(--muted)}.weather-icon{display:inline-flex;width:34px;height:34px;color:var(--accent);flex-shrink:0}.weather-icon.sun{color:var(--yellow)}.weather-icon svg{width:100%;height:100%}.weather-tomorrow>.weather-icon{width:55px;height:55px}.weather-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;border-top:1px solid var(--line);padding-top:12px}.weather-day{display:flex;flex-direction:column;align-items:center;gap:3px}.weather-day>span:first-child{font-size:11px;color:var(--muted)}.weather-day strong{font-size:15px}.weather-day small{font-size:11px;color:var(--muted)}.dashboard-bottom{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-top:6px}.dashboard-bottom button{font-size:12px}dialog{background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:22px;width:min(900px,94vw);max-height:90dvh;padding:24px;box-shadow:0 20px 100px #0005}dialog::backdrop{background:#061c2477;backdrop-filter:blur(6px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;position:sticky;top:-24px;background:var(--bg);padding:8px 0;z-index:2}.hour-details{display:none}.prices .caption{max-height:3.2em;overflow:auto}.side .chip{display:inline-block}.battery-card p{margin:8px 0}.soc{margin:12px 0 8px}.price-now>strong{font-size:30px}.side{gap:14px}.prices,.history,.sources{margin-top:16px}
@media(min-width:700px) and (min-height:650px){
 header{height:76px}main{height:calc(100dvh - 76px)}#dashboard{height:100%;display:flex;flex-direction:column}.intro{flex-shrink:0;min-height:46px;margin-bottom:12px}.intro h1{font-size:23px}.intro .eyebrow{font-size:9px}.cockpit-grid{display:grid;flex:1;min-height:0;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(250px,1.15fr) minmax(215px,1fr);gap:14px}.overview{display:contents}.flow-panel{display:flex;flex-direction:column;min-height:0}.flow{flex:1;min-height:0;width:100%;height:auto}.flow .energy-node{padding:3px;min-width:86px}.node-icon{width:43px;height:43px;border-radius:13px;margin:0}.node-icon svg{width:32px;height:32px}.energy-node strong{font-size:22px}.energy-node small{font-size:9px;max-width:112px}.energy-node>span:not(.node-icon){font-size:11px}.grid{left:15%}.battery{left:85%}.solar{top:20%}.home{top:81%}.flow-caption{font-size:9px;margin:3px 0 0}.side{grid-template-columns:1fr;grid-template-rows:1fr 1fr;min-height:0;gap:12px}.side .panel{padding:16px 20px}.side h2{display:none}.battery-card{position:relative;display:grid;grid-template-columns:1fr auto;column-gap:16px;align-content:center}.battery-card .eyebrow{grid-column:1}.battery-card .soc{grid-column:2;grid-row:1/4;margin:0;display:flex;flex-direction:column;align-items:flex-end;gap:4px}.soc strong{font-size:40px;letter-spacing:-2px}.soc span{font-size:10px}.battery-card progress{grid-column:1;margin:10px 0 4px}.battery-card p{grid-column:1;font-size:10px;margin:0}.battery-card>.chip{display:none}.price-now{display:grid;grid-template-columns:1fr auto;align-content:center;gap:4px 12px}.price-now>.eyebrow{grid-column:1/-1}.price-now>strong{font-size:27px;margin:0;grid-column:1;white-space:nowrap}.price-now p{font-size:10px;margin:0;grid-column:1;line-height:1.3}.price-now small{font-size:10px;grid-column:2;grid-row:2/4;align-self:center;max-width:90px}.prices{margin:0;display:flex;flex-direction:column;min-height:0}.prices h2{font-size:18px}.prices .eyebrow{font-size:8px}.segmented button{padding:6px 10px;font-size:11px;min-height:36px}#price-summary{font-size:11px;margin:8px 0 0}.chart{flex:1;min-height:55px;margin:12px 0 4px;gap:4px}.prices .caption{font-size:9px;margin:4px 0 0}.bar-label{font-size:8px}.weather{margin:0;display:flex;flex-direction:column;min-height:0}.weather .eyebrow{font-size:8px}.weather h2{font-size:18px}.weather-tomorrow{flex:1;padding:8px 0}.weather-week{padding-top:8px}.weather-day{gap:1px}.weather-day .weather-icon{width:28px;height:28px}.weather .caption{font-size:8px;margin:6px 0 0}.dashboard-bottom{flex-shrink:0;height:35px;margin:0}.dashboard-bottom button{min-height:32px;padding:4px 0}.notice{margin:0 0 8px;padding:6px 10px;font-size:11px}.panel{padding:16px}.section-title{flex-wrap:nowrap;gap:8px}.section-title .chip{font-size:9px;padding:5px 9px}
}
@media(min-width:700px) and (max-width:850px) and (min-height:900px){.cockpit-grid{grid-template-columns:1fr 1fr;grid-template-rows:1.2fr 1fr}.price-now{display:block}.price-now small{display:block;margin-top:8px;max-width:none}.energy-node small{max-width:85px}.flow .node-icon{width:46px;height:46px}.flow .grid{left:16%}.flow .battery{left:84%}.flow .energy-node strong{font-size:20px}.prices .section-title{flex-wrap:wrap}.weather-tomorrow>div{display:block}.weather-tomorrow strong{display:block;font-size:32px}.weather-tomorrow small{display:block}.battery-card{display:block}.battery-card .soc{margin:16px 0;align-items:flex-start}.battery-card .soc strong{font-size:54px}}
@media(max-width:699px){.cockpit-grid{display:block}.overview{display:block}.side{display:grid;grid-template-columns:1fr 1fr;margin-top:14px}.flow{height:350px}.intro h1{font-size:26px}.intro{display:block}.intro .live{display:inline-block;margin-top:10px}.weather{margin-top:16px}.hour-details{display:block}.weather-tomorrow strong{font-size:35px}}

dialog .hour-details{display:block}
@media(min-width:700px) and (min-height:650px){.flow-caption{display:none}.flow .solar{top:25%;left:22%}.flow .battery{top:25%;left:78%}.flow .grid{top:75%;left:22%}.flow .home{top:75%;left:78%}.flow .node-icon{width:36px;height:36px;border-radius:11px}.flow .node-icon svg{width:27px;height:27px}.flow .energy-node strong{font-size:21px}.weather .caption{flex-shrink:0}}
.lines circle{display:none}.flow::after{content:'ϟ';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--accent);border-radius:50%;background:var(--soft);color:var(--accent);font-size:24px;line-height:1}
/* Colourful energy palette, with identical tablet geometry in both themes. */
:root{--sun:#a65100;--sun-soft:#fff0cc;--grid:#285ec7;--grid-soft:#e4eeff;--battery:#7941b5;--battery-soft:#f1e6ff;--house:#b34259;--house-soft:#ffe6ed;--weather:#176eae;--weather-soft:#e5f3ff;--price:#12715d;--price-soft:#def8ee;--panel-tint:#ffffffa6}
html[data-theme=dark]{--sun:#ffd16c;--sun-soft:#493823;--grid:#8bb7ff;--grid-soft:#253c61;--battery:#d0a5ff;--battery-soft:#3d2b56;--house:#ff9eb2;--house-soft:#4b2c3e;--weather:#88d4ff;--weather-soft:#213e55;--price:#8ce5c4;--price-soft:#20483e;--panel-tint:#17262c99}
@media(prefers-color-scheme:dark){html:not([data-theme=light]){--sun:#ffd16c;--sun-soft:#493823;--grid:#8bb7ff;--grid-soft:#253c61;--battery:#d0a5ff;--battery-soft:#3d2b56;--house:#ff9eb2;--house-soft:#4b2c3e;--weather:#88d4ff;--weather-soft:#213e55;--price:#8ce5c4;--price-soft:#20483e;--panel-tint:#17262c99}}
body{background:radial-gradient(ellipse at 0 0,color-mix(in srgb,var(--grid-soft) 65%,transparent),transparent 55%),radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--battery-soft) 65%,transparent),transparent 55%),var(--bg)}
.mark{background:linear-gradient(140deg,#38c5ae,#4c85ee 65%,#a06bdd);color:#fff;box-shadow:0 5px 15px #4b86d82b}
.flow-panel{background:linear-gradient(145deg,var(--sun-soft),var(--panel) 42%,var(--grid-soft));border-color:color-mix(in srgb,var(--grid) 22%,var(--line))}
.energy-node{background:var(--panel-tint);border:1px solid color-mix(in srgb,var(--line) 65%,transparent);backdrop-filter:blur(8px)}
.solar{--node:var(--sun);--node-bg:var(--sun-soft)}.grid{--node:var(--grid);--node-bg:var(--grid-soft)}.battery{--node:var(--battery);--node-bg:var(--battery-soft)}.home{--node:var(--house);--node-bg:var(--house-soft)}
.energy-node .node-icon{background:var(--node-bg);color:var(--node);border-color:color-mix(in srgb,var(--node) 25%,transparent);box-shadow:0 4px 14px color-mix(in srgb,var(--node) 14%,transparent)}
.energy-node strong{color:var(--node)}
#solar-line.active{stroke:var(--sun)}#grid-line.active{stroke:var(--grid)}#battery-line.active{stroke:var(--battery)}#home-line.active{stroke:var(--house)}
.battery-card{background:linear-gradient(120deg,var(--battery-soft),var(--panel));border-color:color-mix(in srgb,var(--battery) 28%,var(--line))}.battery-card .eyebrow,.soc strong{color:var(--battery)}.battery-card progress{accent-color:var(--battery)}.battery-card progress::-webkit-progress-value{background:linear-gradient(90deg,#8c65dc,#c58af3)}
.price-now{background:linear-gradient(120deg,var(--price-soft),var(--panel));border-color:color-mix(in srgb,var(--price) 24%,var(--line))}.price-now>strong{color:var(--price)}
.prices{background:linear-gradient(145deg,var(--panel),var(--price-soft));border-color:color-mix(in srgb,var(--price) 22%,var(--line))}.bar{opacity:.95}
.weather{background:linear-gradient(130deg,var(--weather-soft),var(--panel) 75%);border-color:color-mix(in srgb,var(--weather) 25%,var(--line))}.weather h2,.weather-tomorrow strong{color:var(--weather)}.weather-icon{color:var(--weather)}.weather-icon.sun{color:var(--sun)}.weather-icon.storm{color:var(--battery)}.weather-icon.snow{color:var(--grid)}.weather-day{border-radius:10px;background:color-mix(in srgb,var(--panel) 42%,transparent)}
.weather-icon svg{fill:color-mix(in srgb,currentColor 12%,transparent)}
@media(min-width:700px) and (min-height:650px){.flow .energy-node{padding:4px 7px}.flow .energy-node small{font-size:8px}}

.bar-price{position:absolute;left:50%;transform:translateX(-50%);font-size:9px;line-height:1;font-weight:650;color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums;pointer-events:none}.chart{margin-top:20px}

.auth-link{background:transparent!important;color:var(--ink)!important;border:1px solid var(--line);font-size:13px;margin-top:12px}.login input{margin-bottom:14px}.login [hidden]{display:none!important}

.weather-icon.sculpted svg{fill:none;filter:drop-shadow(0 2px 1px #132b4938)}.weather-icon.sculpted{overflow:visible}
