@font-face{font-family:"Kanit";src:url("/assets/Kanit-Light.ttf") format("truetype");font-style:normal;font-weight:300;font-display:swap}
@font-face{font-family:"Kanit";src:url("/assets/Kanit-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"Kanit";src:url("/assets/Kanit-Medium.ttf") format("truetype");font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:"Kanit";src:url("/assets/Kanit-SemiBold.ttf") format("truetype");font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:"Kanit";src:url("/assets/Kanit-ExtraBold.ttf") format("truetype");font-style:normal;font-weight:800 950;font-display:swap}
:root{--orange:#f5a000;--orange-deep:#e98a00;--navy:#14334d;--navy-soft:#385268;--green:#28b463;--panel:rgba(255,255,255,.88);--line:rgba(20,51,77,.16);--shadow:0 12px 32px rgba(11,31,47,.24)}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0}
body{overflow:hidden;color:var(--navy);background:#dfe7e8;font-family:"Kanit",sans-serif;font-variant-numeric:tabular-nums}
.tv-dashboard{position:relative;width:100vw;height:100vh;min-height:680px;overflow:hidden;isolation:isolate}
.background-media{position:absolute;inset:0;z-index:-2;background:#dce3e4 url("/assets/roof.jpg") center center/cover no-repeat}
.background-media::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,25,40,.05),transparent 34%,rgba(5,25,40,.08));pointer-events:none}
.roof-shape{display:none}
.glass-card{border:1px solid rgba(255,255,255,.82);background:var(--panel);box-shadow:var(--shadow);backdrop-filter:blur(11px) saturate(1.08);-webkit-backdrop-filter:blur(11px) saturate(1.08)}
.top-row{position:absolute;inset:20px 22px auto;display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.site-card{display:flex;align-items:center;gap:18px;width:min(650px,48vw);min-height:154px;padding:18px 28px 18px 22px;border-radius:14px}
.site-mark{display:grid;place-items:center;flex:0 0 96px;width:96px;height:96px;color:var(--orange);border-right:1px solid var(--line);padding-right:19px}
.site-mark svg{width:78px;height:78px}
.site-copy{min-width:0}
.site-copy h1{margin:0;color:var(--navy);font-size:clamp(32px,2.8vw,54px);line-height:.96;letter-spacing:-1.6px;font-weight:900;white-space:nowrap}
.capacity{display:flex;align-items:baseline;gap:10px;margin-top:5px}
.capacity strong{color:var(--orange);font-size:clamp(42px,4vw,70px);line-height:.95;letter-spacing:-2.4px}
.capacity span{font-size:clamp(24px,2vw,38px);font-weight:900}
.site-copy p{margin:7px 0 0;font-size:clamp(15px,1.15vw,22px);font-weight:800}
.brand-card{width:min(500px,39vw);min-height:145px;padding:18px 22px;border-radius:14px}
.brand-line{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand-line strong{display:block;font-size:clamp(22px,1.8vw,34px);font-weight:950;letter-spacing:-.7px}
.brand-line strong span{color:var(--orange)}
.brand-line small{display:block;margin-top:3px;color:var(--navy-soft);font-size:10px;font-weight:800;letter-spacing:1.35px}
.brand-sun{width:48px;height:48px;color:var(--orange);flex:0 0 auto}
.brand-sun svg{width:100%;height:100%}
.status-line{display:flex;align-items:center;justify-content:flex-start;gap:16px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.live-pill{display:inline-flex;align-items:center;gap:9px;color:#8b6619;font-size:14px;font-weight:850}
.live-pill i{width:11px;height:11px;border-radius:50%;background:#eab84c;box-shadow:0 0 0 5px rgba(234,184,76,.16)}
.live-pill.online{color:#177946}
.live-pill.online i{background:#2fc06b;box-shadow:0 0 0 5px rgba(47,192,107,.16)}
.live-pill.offline{color:#b43e35}
.live-pill.offline i{background:#ef5d52;box-shadow:0 0 0 5px rgba(239,93,82,.14)}
.source-time{margin:7px 0 0;text-align:left;color:var(--navy-soft);font-size:11px;font-weight:700}
.dashboard-stage{position:absolute;left:50%;bottom:20px;width:min(calc(100vw - 44px),1740px);transform:translateX(-50%);display:grid;grid-template-columns:minmax(280px,.8fr) minmax(560px,1.46fr) minmax(280px,.8fr);gap:18px;align-items:end}
.dashboard-stage{--navy:#16324a;--navy-soft:#425466}
.dashboard-stage>.glass-card{border-color:rgba(255,255,255,.68);background:rgba(255,255,255,.62);box-shadow:0 10px 25px rgba(11,31,47,.19);backdrop-filter:blur(8px) saturate(1.05);-webkit-backdrop-filter:blur(8px) saturate(1.05)}
.info-card{border-radius:15px;padding:18px 21px}
.energy-card,.battery-card{min-height:270px}
.card-heading{display:flex;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.heading-icon{width:44px;height:44px;color:var(--orange);flex:0 0 auto}
.heading-icon svg{width:100%;height:100%}
.card-heading h2{margin:0;font-size:clamp(26px,2vw,38px);line-height:1;font-weight:950}
.card-heading div>span{display:block;margin-top:6px;color:var(--navy-soft);font-size:11px;font-weight:800;letter-spacing:.7px}
.metric-list{display:grid;gap:0}
.metric-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:14px 0 12px}
.metric-row+.metric-row{border-top:1px solid var(--line)}
.metric-row>span{display:flex;flex-direction:column;gap:4px}
.metric-row b{font-size:clamp(15px,1.1vw,21px)}
.metric-row small{font-size:10px;color:var(--navy-soft);font-weight:800;letter-spacing:.7px}
.metric-row strong{display:flex;align-items:baseline;gap:7px;color:var(--orange);font-size:clamp(34px,3vw,54px);line-height:.85;letter-spacing:-1.8px;white-space:nowrap}
.metric-row em,.battery-card em{color:var(--navy);font-size:17px;font-style:normal;font-weight:900;letter-spacing:0}
.flow-card{position:relative;height:min(42vh,430px);min-height:380px;border-radius:17px;overflow:hidden;background:rgba(255,255,255,.62)}
.flow-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.flow-node,.flow-hub{z-index:1}
.energy-line{fill:none;stroke:rgba(20,51,77,.48);stroke-width:5;stroke-linecap:round;stroke-dasharray:7 9}
.energy-line.active{animation:power-flow 1.55s linear infinite}
.solar-line.active{stroke:var(--orange)}
.load-line.active,.grid-line.active{stroke:#356482}
.battery-line.active{stroke:#36a86d}
.energy-line.reverse{animation-direction:reverse}
@keyframes power-flow{to{stroke-dashoffset:-32}}
.flow-node{position:absolute;display:flex;align-items:center;gap:14px;color:var(--navy)}
.flow-node>div{display:flex;flex-direction:column}
.node-icon{display:grid;place-items:center;width:58px;height:58px;color:var(--orange);flex:0 0 auto}
.node-icon svg{width:100%;height:100%}
.flow-node small{font-size:clamp(13px,1vw,18px);font-weight:950;letter-spacing:.3px}
.flow-node strong{display:flex;align-items:baseline;gap:8px;color:var(--orange);font-size:clamp(34px,3vw,54px);line-height:1;font-weight:950;letter-spacing:-1.4px;white-space:nowrap}
.flow-node em{color:var(--navy);font-size:17px;font-style:normal;letter-spacing:0}
.solar-node{top:18px;left:50%;transform:translateX(-50%)}
.solar-node .node-icon{width:65px;height:65px}
.solar-meter{width:180px;height:5px;margin-top:8px;border-radius:5px;background:rgba(20,51,77,.16);overflow:hidden}
.solar-meter i{display:block;width:0;height:100%;background:var(--orange);border-radius:5px;transition:width .8s ease}
.load-node{bottom:18px;left:50%;transform:translateX(-50%)}
.grid-node{left:24px;top:50%;transform:translateY(-50%)}
.battery-node{right:24px;top:50%;transform:translateY(-50%)}
.battery-node .node-icon{color:#35a96d}
.grid-node>div,.battery-node>div{max-width:210px}
.verify-note,.battery-node div>span{margin-top:5px;color:var(--navy-soft);font-size:10px;font-weight:800}
.flow-hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:58px;height:58px;border-radius:50%;background:#f4efe4;color:var(--orange)}
.flow-hub svg{width:100%;height:100%}
.battery-soc{padding:12px 0;border-bottom:1px solid var(--line)}
.soc-label{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.soc-label span{font-size:17px;font-weight:850}
.soc-label small{font-size:9px;color:var(--navy-soft);font-weight:850;letter-spacing:.8px}
.battery-soc>strong{display:flex;align-items:baseline;gap:6px;margin-top:5px;color:var(--orange);font-size:clamp(42px,4vw,68px);line-height:1;font-weight:950}
.soc-track{height:8px;margin-top:7px;border-radius:8px;background:rgba(20,51,77,.14);overflow:hidden}
.soc-track i{display:block;width:0;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--orange-deep),#ffc247);transition:width .8s ease}
.battery-power{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:11px 0 9px}
.battery-power>span{font-size:15px;font-weight:850}
.battery-power strong{display:flex;align-items:baseline;gap:6px;color:var(--orange);font-size:clamp(27px,2.2vw,41px);line-height:1;font-weight:950;white-space:nowrap}
.battery-state{display:flex;align-items:center;gap:9px;color:var(--navy-soft);font-size:12px;font-weight:850}
.battery-state i{width:9px;height:9px;border-radius:50%;background:#36ad70}
/* Dark typography keeps numeric data legible over the rooftop photograph. */
.dashboard-stage .metric-row strong,.dashboard-stage .flow-node strong,
.dashboard-stage .battery-soc>strong,.dashboard-stage .battery-power strong{color:var(--navy);font-weight:600}
.dashboard-stage .flow-node strong b{font-weight:600}
.dashboard-stage .card-heading h2{font-weight:600}
.dashboard-stage .flow-node small,.dashboard-stage .soc-label span,
.dashboard-stage .battery-power>span{font-weight:600}
.compatibility-data{display:none!important}
@media(max-width:1450px){
  .top-row{inset:14px 16px auto}
  .site-card{min-height:130px;padding:15px 21px;width:min(570px,48vw)}
  .site-mark{width:80px;height:80px;flex-basis:80px}
  .site-mark svg{width:66px;height:66px}
  .brand-card{min-height:126px;padding:14px 18px}
  .dashboard-stage{left:50%;right:auto;bottom:14px;width:calc(100vw - 32px);gap:13px;grid-template-columns:minmax(250px,.78fr) minmax(520px,1.5fr) minmax(250px,.78fr)}
  .info-card{padding:15px 17px}
  .energy-card,.battery-card{min-height:238px}
  .flow-card{min-height:360px;height:min(47vh,400px)}
  .metric-row{padding:11px 0 9px}
  .battery-soc{padding:10px 0}
  .grid-node{left:18px}.battery-node{right:18px}
  .node-icon{width:49px;height:49px}
}
@media(max-width:1050px){
  body{overflow:auto}
  .tv-dashboard{height:auto;min-height:100vh;padding:14px}
  .background-media{position:fixed}
  .top-row,.dashboard-stage{position:relative;inset:auto}
  .dashboard-stage{width:auto;transform:none}
  .top-row{display:grid;grid-template-columns:1fr;gap:12px}
  .site-card,.brand-card{width:100%}
  .dashboard-stage{display:flex;flex-direction:column;margin-top:220px}
  .flow-card{order:-1;width:100%;height:450px}
  .info-card{width:100%;min-height:0}
}
@media(max-width:650px){
  .tv-dashboard{padding:9px}
  .site-card{gap:10px;padding:13px}
  .site-mark{width:62px;height:62px;flex-basis:62px;padding-right:10px}
  .site-mark svg{width:52px;height:52px}
  .site-copy h1{font-size:27px;white-space:normal}
  .capacity strong{font-size:42px}
  .brand-card{padding:14px}
  .dashboard-stage{margin-top:140px}
  .flow-card{min-height:540px}
  .flow-lines,.flow-hub{display:none}
  .flow-node{position:absolute!important;transform:none!important;margin:0;padding:17px 0;border-bottom:1px solid var(--line)}
  .solar-node{inset:8px 18px auto!important}
  .grid-node{left:18px!important;right:auto!important;top:176px!important;width:calc(50% - 25px)}
  .battery-node{right:18px!important;left:auto!important;top:176px!important;width:calc(50% - 25px)}
  .load-node{left:18px!important;right:18px!important;bottom:4px!important}
  .grid-node .node-icon,.battery-node .node-icon{width:38px;height:38px}
  .flow-node strong{font-size:28px}
  .solar-meter{width:150px}
}
/* Compact TV layout + lighter Kanit type (2026-10-15).
   Overrides only; restore backup from .codex-backup/20261015-compact-ui if needed. */
.site-copy h1,.brand-line strong{font-weight:600}
.site-copy p,.capacity span,.live-pill,.source-time{font-weight:400}
.capacity strong{font-weight:600}
.dashboard-stage .card-heading h2{font-weight:600}
.dashboard-stage .metric-row b,
.dashboard-stage .metric-row small,
.dashboard-stage .flow-node small,
.dashboard-stage .soc-label span,
.dashboard-stage .soc-label small,
.dashboard-stage .battery-power>span,
.dashboard-stage .battery-state,
.dashboard-stage .battery-node div>span,
.dashboard-stage .verify-note{font-weight:400}
.dashboard-stage .metric-row strong,
.dashboard-stage .flow-node strong,
.dashboard-stage .flow-node strong b,
.dashboard-stage .battery-soc>strong,
.dashboard-stage .battery-power strong{font-weight:400}
@media(min-width:1051px){
  .dashboard-stage{
    bottom:14px;
    width:min(calc(100vw - 60px),1580px);
    gap:14px;
    grid-template-columns:minmax(245px,.84fr) minmax(495px,1.55fr) minmax(245px,.84fr);
  }
  .dashboard-stage .info-card{padding:12px 16px;border-radius:13px}
  .dashboard-stage .energy-card,.dashboard-stage .battery-card{min-height:0}
  .dashboard-stage .card-heading{gap:8px;padding-bottom:8px}
  .dashboard-stage .heading-icon{width:31px;height:31px}
  .dashboard-stage .card-heading h2{font-size:clamp(20px,1.6vw,29px);line-height:1.07}
  .dashboard-stage .card-heading div>span{font-size:9px;margin-top:1px;letter-spacing:.2px}
  .dashboard-stage .metric-row{padding:9px 0 8px;gap:7px}
  .dashboard-stage .metric-row>span{gap:1px}
  .dashboard-stage .metric-row b{font-size:clamp(13px,.9vw,17px);line-height:1.2}
  .dashboard-stage .metric-row small{font-size:9px}
  .dashboard-stage .metric-row strong{font-size:clamp(27px,2vw,39px);letter-spacing:-.8px;line-height:1.05;gap:5px}
  .dashboard-stage .metric-row em,.dashboard-stage .battery-card em{font-size:13px}
  .dashboard-stage .flow-card{height:clamp(262px,31vh,320px);min-height:0;border-radius:14px}
  .dashboard-stage .flow-node{gap:8px}
  .dashboard-stage .flow-node small{font-size:clamp(11px,.84vw,15px);line-height:1.15}
  .dashboard-stage .flow-node strong{font-size:clamp(27px,2.05vw,39px);gap:5px;letter-spacing:-.6px}
  .dashboard-stage .flow-node em{font-size:13px}
  .dashboard-stage .node-icon{width:42px;height:42px}
  .dashboard-stage .solar-node .node-icon{width:47px;height:47px}
  .dashboard-stage .solar-node{top:11px}
  .dashboard-stage .load-node{bottom:11px}
  .dashboard-stage .grid-node{left:14px}
  .dashboard-stage .battery-node{right:14px}
  .dashboard-stage .grid-node>div,.dashboard-stage .battery-node>div{max-width:175px}
  .dashboard-stage .solar-meter{height:4px;width:125px;margin-top:6px}
  .dashboard-stage .verify-note,.dashboard-stage .battery-node div>span{font-size:9px;margin-top:4px;max-width:170px}
  .dashboard-stage .flow-hub{width:48px;height:48px}
  .dashboard-stage .battery-soc{padding:9px 0}
  .dashboard-stage .soc-label span{font-size:14px}
  .dashboard-stage .soc-label small{font-size:8px}
  .dashboard-stage .battery-soc>strong{font-size:clamp(32px,3vw,48px);margin-top:4px}
  .dashboard-stage .soc-track{height:6px;margin-top:5px}
  .dashboard-stage .battery-power{padding:9px 0 8px;gap:7px}
  .dashboard-stage .battery-power>span{font-size:13px}
  .dashboard-stage .battery-power strong{font-size:clamp(23px,1.8vw,32px)}
  .dashboard-stage .battery-state{font-size:11px;gap:6px}
  .dashboard-stage .battery-state i{width:7px;height:7px}
}

/* 2026-10-15: Extra-compact lower panels, thinner site/header lettering.
   Desktop lower-third target: center roughly 23vh, with proportionally smaller side panels.
   Does not change the narrow/mobile flex layout. */
/* Header uses an actual self-hosted Kanit Light face (not synthetic thinning). */
.site-copy h1, .brand-line strong, .brand-line strong span,
.capacity strong, .capacity span, .site-copy p,
.brand-line small, .source-time, .live-pill {font-weight:300}
@media(min-width:1051px){
 .dashboard-stage{
   bottom:10px;
   width:min(calc(100vw - 64px),1490px);
   gap:12px;
   grid-template-columns:minmax(215px,.82fr) minmax(450px,1.53fr) minmax(215px,.82fr);
 }
 .dashboard-stage .info-card{padding:9px 12px;border-radius:11px}
 .dashboard-stage .energy-card,.dashboard-stage .battery-card{min-height:0}
 .dashboard-stage .card-heading{gap:7px;padding-bottom:6px}
 .dashboard-stage .heading-icon{width:26px;height:26px}
 .dashboard-stage .card-heading h2{font-size:clamp(17px,1.26vw,25px);line-height:1.1;font-weight:400}
 .dashboard-stage .card-heading div>span{font-size:8px;letter-spacing:.2px;margin-top:2px}
 .dashboard-stage .metric-row{padding:6px 0 5px;gap:6px}
 .dashboard-stage .metric-row>span{gap:1px}
 .dashboard-stage .metric-row b{font-size:clamp(12px,.8vw,15px);font-weight:400;line-height:1.15}
 .dashboard-stage .metric-row small{font-size:8px;font-weight:400}
 .dashboard-stage .metric-row strong{font-size:clamp(22px,1.6vw,32px);font-weight:400;gap:4px;line-height:1.04;letter-spacing:-.4px}
 .dashboard-stage .metric-row em,.dashboard-stage .battery-card em{font-size:11px;font-weight:400}
 .dashboard-stage .flow-card{height:clamp(213px,23vh,252px);min-height:0;border-radius:12px}
 .dashboard-stage .flow-node{gap:7px}
 .dashboard-stage .flow-node small{font-size:clamp(10px,.72vw,13px);font-weight:400;line-height:1.1}
 .dashboard-stage .flow-node strong,.dashboard-stage .flow-node strong b{font-size:clamp(22px,1.62vw,32px);font-weight:400;letter-spacing:-.4px;gap:4px}
 .dashboard-stage .flow-node em{font-size:11px;font-weight:400}
 .dashboard-stage .node-icon{width:35px;height:35px}
 .dashboard-stage .solar-node .node-icon{width:39px;height:39px}
 .dashboard-stage .solar-node{top:9px}
 .dashboard-stage .load-node{bottom:9px}
 .dashboard-stage .grid-node{left:12px}
 .dashboard-stage .battery-node{right:12px}
 .dashboard-stage .grid-node>div,.dashboard-stage .battery-node>div{max-width:160px}
 .dashboard-stage .solar-meter{width:103px;height:3px;margin-top:5px}
 .dashboard-stage .verify-note,.dashboard-stage .battery-node div>span{font-size:8px;font-weight:400;max-width:145px;margin-top:3px}
 .dashboard-stage .flow-hub{width:40px;height:40px}
 .dashboard-stage .battery-soc{padding:7px 0}
 .dashboard-stage .soc-label span{font-size:12px;font-weight:400}
 .dashboard-stage .soc-label small{font-size:7px;font-weight:400}
 .dashboard-stage .battery-soc>strong{font-size:clamp(26px,2.3vw,39px);font-weight:400;margin-top:3px}
 .dashboard-stage .soc-track{height:5px;margin-top:4px}
 .dashboard-stage .battery-power{padding:7px 0 6px;gap:5px}
 .dashboard-stage .battery-power>span{font-size:11px;font-weight:400}
 .dashboard-stage .battery-power strong{font-size:clamp(19px,1.4vw,27px);font-weight:400}
 .dashboard-stage .battery-state{font-size:10px;font-weight:400;gap:5px}
 .dashboard-stage .battery-state i{width:6px;height:6px}
}

/* Balanced header typography: actual Kanit Medium for the primary numbers and labels,
   Kanit Regular for supporting copy. No synthetic outline thickening. */
.top-row .site-copy h1,
.top-row .capacity strong,
.top-row .capacity span,
.top-row .brand-line strong,
.top-row .brand-line strong span{
  font-weight:500;
  -webkit-text-stroke:0;
}
.top-row .site-copy p,
.top-row .brand-line small,
.top-row .live-pill,
.top-row .source-time{
  font-weight:400;
  -webkit-text-stroke:0;
}
@media(prefers-reduced-motion:reduce){.energy-line.active{animation:none}}

/* Translucent panels and compact environmental equivalents. */
.glass-card,.dashboard-stage>.glass-card{
  background:rgba(255,255,255,.38);
  border-color:rgba(255,255,255,.64);
  box-shadow:0 8px 24px rgba(11,31,47,.14);
  backdrop-filter:blur(6px) saturate(1.05);
  -webkit-backdrop-filter:blur(6px) saturate(1.05);
}
.environment-card{position:relative;min-width:0;z-index:3}
.environment-row{display:flex;align-items:center;gap:14px;padding:10px 0}
.environment-row+.environment-row{border-top:1px solid var(--line)}
.eco-icon{width:48px;height:48px;flex:none;color:#16324a}
.eco-accent{stroke:#159955}
.environment-row h2{margin:0;font-size:16px;font-weight:400;line-height:1.35}
.environment-row strong{display:flex;align-items:baseline;gap:7px;font-size:32px;font-weight:500;line-height:1.2}
.environment-row em{font-size:14px;font-weight:400;font-style:normal}
.environment-method{border-top:1px solid var(--line);padding-top:5px;color:var(--navy-soft)}
.environment-method summary{cursor:pointer;font-size:12px;min-height:28px;display:flex;align-items:center;gap:6px}
.environment-method summary::after{content:"ⓘ"}
.environment-method summary:focus-visible{outline:2px solid var(--navy);outline-offset:3px;border-radius:4px}
.method-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:340px;max-width:calc(100vw - 28px);padding:18px;border-radius:12px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid #fff;box-shadow:var(--shadow);font-size:13px;color:var(--navy);line-height:1.5}
.method-popover h3{font-size:16px;font-weight:500;margin:0 0 8px}
.method-popover p{margin:8px 0}
.method-popover ul{padding-left:18px;margin:8px 0}
.method-popover a{color:#075e43;text-underline-offset:3px}
@media(min-width:1051px){
 .environment-row{gap:10px;padding:6px 0}
 .eco-icon{width:38px;height:38px}
 .environment-row h2{font-size:clamp(11px,.8vw,15px)}
 .environment-row strong{font-size:clamp(22px,1.65vw,30px)}
 .environment-row em{font-size:11px}
 .environment-method summary{font-size:10px;min-height:24px}
}
@media(max-width:650px){
 .grid-node,.battery-node{gap:6px;flex-wrap:wrap}
 .grid-node>div,.battery-node>div{min-width:0;max-width:100%}
 .method-popover{right:0}
}

/* 2026-10-15: balanced three-column lower deck and supplied NEO logo. */
.brand-card{display:grid;place-items:center;overflow:hidden}
.neo-brand-logo{position:relative;width:210px;height:116px;overflow:hidden;isolation:isolate}
.neo-brand-logo img{
  position:absolute;
  top:-24px;
  left:10px;
  width:190px;
  height:190px;
  max-width:none;
  object-fit:contain;
  mix-blend-mode:multiply;
}
@media(min-width:1051px){
  .site-card{
    width:min(585px,43.2vw);
    min-height:139px;
    padding:16px 25px 16px 20px;
    gap:16px;
  }
  .site-mark{width:86px;height:86px;flex-basis:86px;padding-right:17px}
  .site-mark svg{width:70px;height:70px}
  .site-copy h1{font-size:clamp(29px,2.52vw,49px)}
  .capacity strong{font-size:clamp(38px,3.6vw,63px)}
  .capacity span{font-size:clamp(22px,1.8vw,34px)}
  .site-copy p{font-size:clamp(14px,1.04vw,20px)}
  .brand-card{
    width:min(450px,35.1vw);
    min-height:130px;
    height:130px;
    padding:7px 18px;
  }
  .dashboard-stage{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
  }
  .dashboard-stage>.glass-card{
    width:100%;
    height:clamp(230px,25vh,270px);
  }
  .dashboard-stage .flow-card{height:clamp(230px,25vh,270px)}
}

/* 2026-10-15: reference-led layout — open roof canvas, vertical flow panel,
   compact metric tiles, and a neutral graphite/solar/eco palette. */
:root{
  --orange:#f59e0b;
  --orange-deep:#df7d00;
  --navy:#334155;
  --navy-soft:#64748b;
  --green:#22a06b;
  --grid-blue:#39728c;
  --panel:rgba(255,255,255,.72);
  --line:rgba(51,65,85,.16);
  --shadow:0 12px 34px rgba(15,23,42,.2);
}
.background-media::after{background:linear-gradient(180deg,rgba(15,23,42,.02),transparent 44%,rgba(15,23,42,.05))}
.glass-card,
.dashboard-stage>.glass-card,
.metric-cluster>.glass-card{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.88);
  box-shadow:var(--shadow);
  backdrop-filter:blur(9px) saturate(1.04);
  -webkit-backdrop-filter:blur(9px) saturate(1.04);
}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.top-row{inset:18px 22px auto}
.site-card{width:min(535px,43vw);min-height:145px;padding:17px 24px 17px 20px;border-radius:16px;gap:16px}
.site-mark{width:84px;height:84px;flex-basis:84px;padding-right:17px;color:var(--orange)}
.site-mark svg{width:68px;height:68px}
.site-copy h1{color:var(--navy);font-size:clamp(30px,2.5vw,48px);font-weight:600;letter-spacing:-1.2px}
.capacity{margin-top:4px}
.capacity strong{font-size:clamp(38px,3.5vw,60px);font-weight:600;color:var(--orange)}
.capacity span{font-size:clamp(21px,1.8vw,32px);font-weight:500;color:var(--navy)}
.site-copy p{font-size:clamp(13px,1vw,18px);font-weight:400;color:var(--navy)}
.brand-card{width:min(360px,31vw);height:116px;min-height:116px;padding:6px 18px;border-radius:16px}
.neo-brand-logo{width:180px;height:100px}
.neo-brand-logo img{top:-17px;left:10px;width:160px;height:160px}
.dashboard-stage{
  --navy:#334155;
  --navy-soft:#64748b;
  bottom:14px;
  width:min(calc(100vw - 40px),1740px);
  grid-template-columns:minmax(330px,1fr) minmax(460px,1.36fr) minmax(420px,1.25fr);
  gap:14px;
  align-items:end;
}
.metric-cluster{display:grid;gap:10px;min-width:0;align-items:stretch}
.energy-card{grid-template-columns:repeat(2,minmax(0,1fr))}
.environment-card{grid-template-columns:repeat(3,minmax(0,1fr));z-index:3}
.metric-tile,
.environment-row{height:168px;min-width:0;border-radius:15px;padding:13px 12px}
.metric-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--navy)}
.tile-icon{display:grid;place-items:center;width:50px;height:50px;margin-bottom:6px;color:var(--orange)}
.tile-icon svg{width:100%;height:100%}
.metric-tile h2{margin:0;max-width:180px;font-size:clamp(13px,1vw,17px);font-weight:500;line-height:1.25}
.metric-tile strong{display:flex;align-items:baseline;justify-content:center;gap:5px;margin-top:7px;color:var(--orange-deep);font-size:clamp(29px,2.25vw,40px);font-weight:600;line-height:1}
.metric-tile em{font-size:13px;font-weight:500;font-style:normal;color:var(--navy)}
.flow-card{height:310px;min-height:310px;border-radius:16px;padding:10px 18px;overflow:hidden}
@media(min-width:1051px){.dashboard-stage>.flow-card{height:310px;min-height:310px}}
.flow-lines,.flow-hub{display:none!important}
.flow-stack{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));height:100%}
.flow-node,
.solar-node,.load-node,.grid-node,.battery-node{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  display:grid;
  grid-template-columns:48px minmax(105px,1fr) 34px minmax(105px,auto);
  align-items:center;
  gap:12px;
  width:100%;
  min-width:0;
  padding:7px 2px;
  color:var(--navy);
}
.flow-node+.flow-node{border-top:1px solid var(--line)}
.flow-node .node-icon,
.solar-node .node-icon,
.grid-node .node-icon,
.battery-node .node-icon{grid-column:1;width:46px;height:46px;color:var(--orange)}
.grid-node .node-icon{color:var(--grid-blue)}
.battery-node .node-icon{color:var(--green)}
.flow-label{grid-column:2;display:flex;flex-direction:column;min-width:0}
.flow-label small{font-size:clamp(12px,.95vw,16px);font-weight:600;line-height:1.1;letter-spacing:.2px}
.flow-label i{margin-top:3px;color:var(--navy-soft);font-size:clamp(10px,.75vw,13px);font-weight:400;font-style:normal;line-height:1.15}
.flow-chevron{grid-column:3;width:34px;height:24px;color:var(--orange)}
.grid-node .flow-chevron{color:var(--grid-blue)}
.battery-node .flow-chevron{color:var(--green)}
.flow-node strong,
.dashboard-stage .flow-node strong,
.dashboard-stage .flow-node strong b{
  grid-column:4;
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:5px;
  color:var(--navy);
  font-size:clamp(25px,2.05vw,36px);
  font-weight:600;
  line-height:1;
  letter-spacing:-.6px;
  white-space:nowrap;
}
.flow-node em,.dashboard-stage .flow-node em{font-size:13px;font-weight:600;font-style:normal;color:var(--orange-deep)}
.grid-node em{color:var(--grid-blue)}
.battery-node em{color:var(--green)}
.solar-meter{position:absolute;left:60px;right:2px;bottom:3px;width:auto;height:3px;margin:0;border-radius:4px;background:rgba(51,65,85,.12);overflow:hidden}
.solar-meter i{display:block;height:100%;background:var(--orange);border-radius:4px}
.verify-note{position:absolute;left:60px;bottom:2px;margin:0;color:var(--navy-soft);font-size:8px;font-weight:400;line-height:1}
.environment-row,
.environment-row+.environment-row{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  border-top:1px solid rgba(255,255,255,.88);
  text-align:center;
  color:var(--navy);
}
.eco-icon{width:45px;height:45px;color:var(--navy);flex:none}
.eco-accent{stroke:var(--green)}
.environment-row>div{display:flex;flex-direction:column;align-items:center;min-width:0}
.environment-row h2{margin:0;min-height:34px;font-size:clamp(11px,.82vw,14px);font-weight:500;line-height:1.2}
.environment-row strong{display:flex;align-items:baseline;justify-content:center;gap:5px;margin-top:4px;color:var(--green);font-size:clamp(28px,2vw,36px);font-weight:600;line-height:1}
.environment-row em{font-size:11px;font-weight:500;font-style:normal;color:var(--navy)}
.environment-method{position:static;width:100%;margin-top:0;padding-top:2px;border:0;color:var(--navy-soft)}
.environment-method summary{justify-content:center;min-height:18px;font-size:9px;line-height:1;white-space:nowrap}
.environment-method summary::after{content:"ⓘ"}
.method-popover{right:0;bottom:calc(100% + 12px);width:350px;text-align:left;background:rgba(255,255,255,.96)}
@media(max-width:1280px) and (min-width:1051px){
  .dashboard-stage{grid-template-columns:minmax(280px,1fr) minmax(390px,1.32fr) minmax(355px,1.2fr);gap:10px;width:calc(100vw - 24px)}
  .metric-cluster{gap:7px}
  .metric-tile,.environment-row{padding:10px 8px}
  .flow-card{padding-inline:12px}
  .flow-node,.solar-node,.load-node,.grid-node,.battery-node{grid-template-columns:40px minmax(90px,1fr) 28px minmax(90px,auto);gap:7px}
  .flow-node .node-icon,.solar-node .node-icon,.grid-node .node-icon,.battery-node .node-icon{width:39px;height:39px}
  .flow-chevron{width:28px}
}
@media(max-width:1050px){
  body{overflow:auto}
  .tv-dashboard{height:auto;min-height:100vh;padding:14px}
  .background-media{position:fixed}
  .top-row,.dashboard-stage{position:relative;inset:auto}
  .top-row{display:grid;grid-template-columns:1fr;gap:12px}
  .site-card,.brand-card{width:100%}
  .dashboard-stage{display:flex;flex-direction:column;width:auto;transform:none;margin-top:160px;gap:12px}
  .flow-card{order:-1;width:100%;height:320px;min-height:320px}
  .energy-card,.environment-card{width:100%}
  .metric-tile,.environment-row{height:158px}
  .flow-node,.solar-node,.load-node,.grid-node,.battery-node{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;margin:0!important;padding:8px 4px;border-bottom:0}
}
@media(max-width:650px){
  .tv-dashboard{padding:9px}
  .site-card{gap:10px;padding:13px;min-height:132px}
  .site-mark{width:62px;height:62px;flex-basis:62px;padding-right:10px}
  .site-mark svg{width:52px;height:52px}
  .site-copy h1{font-size:26px;white-space:normal}
  .capacity strong{font-size:40px}
  .capacity span{font-size:21px}
  .brand-card{height:116px;min-height:116px}
  .dashboard-stage{margin-top:125px}
  .flow-card{height:336px;min-height:336px;padding:8px 10px}
  .flow-node,.solar-node,.load-node,.grid-node,.battery-node{grid-template-columns:40px minmax(88px,1fr) 24px minmax(78px,auto);gap:7px}
  .flow-node .node-icon,.solar-node .node-icon,.grid-node .node-icon,.battery-node .node-icon{width:38px;height:38px}
  .flow-label small{font-size:11px}
  .flow-label i{font-size:9px}
  .flow-chevron{width:24px}
  .flow-node strong,.dashboard-stage .flow-node strong,.dashboard-stage .flow-node strong b{font-size:23px}
  .flow-node em,.dashboard-stage .flow-node em{font-size:10px}
  .energy-card{grid-template-columns:repeat(2,minmax(0,1fr))}
  .environment-card{grid-template-columns:1fr}
  .metric-tile{height:146px}
  .environment-row{height:132px;flex-direction:row;text-align:left;padding:14px 18px}
  .environment-row>div{align-items:flex-start;flex:1}
  .environment-row h2{min-height:0;font-size:14px}
  .environment-row strong{justify-content:flex-start;font-size:32px}
  .environment-method{width:auto;margin-left:auto}
  .method-popover{right:0;max-width:calc(100vw - 30px)}
}

/* 2026-10-15: accepted 1680 × 945 concept — exact desktop composition. */
.neo-wordmark{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  color:var(--orange);
}
.neo-wordmark-copy{display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.neo-wordmark-copy strong{color:var(--navy);font-size:29px;font-weight:700;letter-spacing:-1.2px;line-height:1}
.neo-wordmark-copy span{color:var(--orange);font-size:25px;font-weight:700;letter-spacing:-1px;line-height:1}
.neo-wordmark-mark{width:60px;height:48px;flex:none}

@media(min-width:1051px){
  .glass-card,
  .dashboard-stage>.glass-card,
  .metric-cluster>.glass-card{
    background:rgba(255,255,255,.80);
    border-color:rgba(255,255,255,.92);
    box-shadow:0 13px 34px rgba(15,23,42,.20);
    backdrop-filter:blur(11px) saturate(1.03);
    -webkit-backdrop-filter:blur(11px) saturate(1.03);
  }
  .top-row{inset:32px 25px auto}
  .site-card{
    width:530px;
    height:155px;
    min-height:155px;
    padding:18px 25px;
    gap:24px;
    border-radius:17px;
  }
  .site-mark{
    width:118px;
    height:105px;
    flex-basis:118px;
    padding-right:24px;
    border-right-color:rgba(51,65,85,.18);
  }
  .site-mark svg{width:80px;height:80px}
  .site-copy h1{font-size:39px;letter-spacing:-1.2px;line-height:1}
  .capacity{margin-top:5px}
  .capacity strong{font-size:53px;line-height:.98}
  .capacity span{font-size:27px}
  .site-copy p{margin-top:7px;font-size:16px;line-height:1.1}
  .brand-card{
    width:392px;
    height:102px;
    min-height:102px;
    padding:18px 20px 18px 25px;
    border-radius:17px;
  }
  .dashboard-stage{
    bottom:29px;
    width:calc(100vw - 40px);
    max-width:none;
    grid-template-columns:minmax(0,523fr) minmax(0,548fr) minmax(0,545fr);
    gap:8px;
    align-items:end;
  }
  .metric-cluster{gap:10px}
  .metric-tile,
  .environment-row{
    height:230px;
    padding:18px 14px;
    border-radius:17px;
  }
  .tile-icon{width:58px;height:58px;margin-bottom:12px}
  .metric-tile h2{max-width:210px;font-size:17px;line-height:1.25}
  .metric-tile strong{margin-top:12px;font-size:42px}
  .metric-tile em{font-size:15px}
  .dashboard-stage>.flow-card,
  .flow-card{
    height:325px;
    min-height:325px;
    padding:11px 19px;
    border-radius:17px;
  }
  .flow-node,
  .solar-node,.load-node,.grid-node,.battery-node{
    grid-template-columns:50px minmax(112px,1fr) 35px minmax(112px,auto);
    gap:12px;
    padding:8px 3px;
  }
  .flow-node .node-icon,
  .solar-node .node-icon,
  .grid-node .node-icon,
  .battery-node .node-icon{width:48px;height:48px}
  .flow-label small{font-size:16px}
  .flow-label i{font-size:12px}
  .flow-node strong,
  .dashboard-stage .flow-node strong,
  .dashboard-stage .flow-node strong b{font-size:34px}
  .flow-node em,.dashboard-stage .flow-node em{font-size:13px}
  .environment-row{gap:8px}
  .eco-icon{width:58px;height:58px}
  .environment-row h2{min-height:38px;font-size:14px;line-height:1.25}
  .environment-row strong{margin-top:8px;font-size:39px}
  .environment-row em{font-size:12px}
  .environment-method{padding-top:4px}
  .environment-method summary{min-height:20px;font-size:9px}
}

@media(max-width:1050px){
  .neo-wordmark{max-width:380px;margin:auto}
}

@media(max-width:650px){
  .neo-wordmark-copy strong{font-size:27px}
  .neo-wordmark-copy span{font-size:22px}
  .neo-wordmark-mark{width:54px;height:44px}
}

/* Reference-matched NEO SOLAR HOME header:
   orange wordmark + tagline on the left, owner's original PNG logo on the right.
   Retains the approved dashboard layout and no extra scripts/network resources. */
.brand-card.neo-brand-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  overflow:hidden;
  padding:9px 13px 9px 19px;
}
.neo-banner-copy{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
  min-width:0;
  white-space:nowrap;
}
.neo-banner-copy strong{
  color:#f5a000;
  font-family:"Kanit",sans-serif;
  font-weight:600;
  font-size:clamp(23px,2.65vw,44px);
  letter-spacing:-.8px;
  line-height:1.08;
}
.neo-banner-copy span{
  color:#394854;
  font-family:"Kanit",sans-serif;
  font-weight:600;
  font-size:clamp(13px,1.4vw,22px);
  line-height:1.2;
  letter-spacing:-.15px;
}
.neo-banner-logo{
  position:relative;
  flex:0 0 108px;
  width:108px;
  height:96px;
  overflow:hidden;
}
.neo-banner-logo img{
  position:absolute;
  width:174px;
  height:174px;
  max-width:none;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  object-fit:contain;
  display:block;
}
@media(min-width:1051px){
  .top-row .brand-card.neo-brand-banner{
    width:min(540px,calc(100vw - 610px));
    height:116px;
    min-height:116px;
    border-radius:17px;
  }
}
@media(max-width:1050px){
  .top-row .brand-card.neo-brand-banner{
    width:100%;
    height:112px;
    min-height:112px;
    padding:8px 16px;
  }
}
@media(max-width:650px){
  .top-row .brand-card.neo-brand-banner{
    height:100px;
    min-height:100px;
    padding:8px 12px;
    gap:6px;
  }
  .neo-banner-copy{gap:4px}
  .neo-banner-copy strong{font-size:clamp(18px,5.5vw,28px);letter-spacing:-.6px}
  .neo-banner-copy span{font-size:clamp(11px,3.15vw,16px)}
  .neo-banner-logo{flex-basis:80px;width:80px;height:84px}
  .neo-banner-logo img{width:140px;height:140px}
}

/* Align the three environmental figures on the same horizontal line.
   Cards 1 and 2 reserve the same 24px footer occupied by the
   "ประมาณการ · ดูสูตร" disclosure in card 3; avoids shifting its number. */
@media(min-width:1051px){
  .environment-row:not(:last-child)::after{
    content:"";
    display:block;
    flex:0 0 24px;
    width:100%;
    pointer-events:none;
  }
}
