:root{--ink:#234530;--green:#24603e;--leaf:#80b28b;--muted:#627a69;--line:#dfebe0;--page:#f6f9f4;--white:#fff;font:14px/1.65 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--page);-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #6aaa74;outline-offset:3px}[hidden]{display:none!important}
.site-header{background:white;border-bottom:1px solid var(--line);min-height:80px;padding:17px max(23px,calc((100vw - 1440px)/2));display:flex;justify-content:space-between;align-items:center;gap:18px}
.logo{display:flex;align-items:center;gap:10px;font-weight:550;font-size:23px;letter-spacing:-.065em;line-height:1.05}.logo strong{font-weight:860}.logo small{display:block;font-size:9px;letter-spacing:.16em;color:#64886e;font-weight:800;margin-top:4px}.logo-mark{width:42px;height:42px;border-radius:13px;background:#20583c;color:#dcf5c2;font-size:26px;display:grid;place-items:center}.header-right{display:flex;align-items:center;gap:12px}.preview-tag{color:#36734a;background:#e6f4e5;padding:8px 11px;border-radius:99px;font-size:10px;font-weight:850;letter-spacing:.07em}.subtle-button,.text-button{border:0;background:transparent;color:#376c47;font-weight:800}.subtle-button:hover,.text-button:hover{text-decoration:underline}
.auth-wrap{width:min(1240px,calc(100% - 38px));display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:56px auto 36px;min-height:615px}.auth-wrap.narrow{grid-template-columns:1fr;max-width:630px;min-height:400px}.auth-panel{background:#fff;border:1px solid var(--line);border-radius:25px;padding:66px 63px;box-shadow:0 20px 65px #2d5c3510}.eyebrow{font-size:10px;font-weight:870;color:#629f72;letter-spacing:.17em}.auth-panel h1{font-size:clamp(38px,4.2vw,62px);line-height:1.15;letter-spacing:-.072em;margin:19px 0;color:#27553a}.auth-panel h1 em,.page-intro h1 em{font-style:normal;color:#82b58b}.auth-panel>p{color:var(--muted);font-size:14px;line-height:1.85;max-width:460px;margin:0 0 31px}.auth-panel .auth-note{margin:25px 0 0;color:#657e6a;font-size:12px}.field-stack,.stack-form{display:grid;gap:16px}.field-stack label,.stack-form label,.horizontal-form label,.sidebar label{display:grid;gap:7px;color:#385a44;font-size:12px;font-weight:740}.field-stack input,.stack-form input,.stack-form select,.horizontal-form input,.sidebar select{width:100%;max-width:100%;min-height:47px;border:1px solid #cfe2d0;border-radius:11px;background:#fcfefb;padding:11px 13px;color:#254832;outline:0;font-size:13px}.field-stack input:focus,.stack-form input:focus,.stack-form select:focus,.horizontal-form input:focus,.sidebar select:focus{border-color:#79ae81;box-shadow:0 0 0 3px #5b956c27}.primary-button{border:0;background:#235b3c;color:#fff;border-radius:12px;min-height:52px;padding:14px 19px;font-weight:820;display:flex;align-items:center;justify-content:space-between;gap:20px;transition:background .15s}.primary-button:hover{background:#37764d}.secondary-button{border:1px solid #c6dfc8;background:#e9f4e7;color:#2c6540;min-height:43px;padding:10px 17px;border-radius:10px;font-size:12px;font-weight:820}.secondary-button:hover{background:#dcefdc}.text-button{margin-top:17px}
.hero-panel{border-radius:25px;color:white;background:radial-gradient(circle at 75% 16%,#37664b,#173d2d 75%);padding:61px;overflow:hidden;position:relative}.hero-panel .light{color:#b2dfa8}.hero-panel h2{font-size:clamp(40px,4.1vw,59px);letter-spacing:-.075em;line-height:1.14;margin:19px 0}.hero-panel>p{font-size:14px;color:#bfd7c4;line-height:1.85;max-width:420px}.mock-preview{margin-top:35px;background:#fbfefa;padding:26px;border-radius:24px;color:#2b5139;box-shadow:0 25px 55px #06170e3b;transform:rotate(-2deg)}.mock-head{display:flex;justify-content:space-between;color:#74977e;font-size:10px;font-weight:850;letter-spacing:.13em}.mock-head .dot{color:#598b64}.mock-content{display:flex;align-items:center;justify-content:space-between;font-size:24px;font-weight:830;letter-spacing:-.045em;margin:20px 0}.mock-content span{font-size:32px;color:#619a6c}.mock-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.mock-grid>div{background:#edf6e9;border-radius:13px;padding:15px;font-size:23px;color:#6b9e71;min-height:105px}.mock-grid strong{display:block;font-size:12px;color:#315f42;margin-top:3px}.mock-grid small{display:block;font-size:10px;color:#56735e}
.workspace-layout{display:grid;grid-template-columns:260px minmax(0,1fr);max-width:1600px;margin:0 auto;min-height:750px}.sidebar{background:#fff;border-right:1px solid var(--line);padding:37px 21px;display:flex;flex-direction:column;gap:16px}.sidebar>.eyebrow{margin-bottom:3px}.sidebar select{margin-top:1px}.sidebar nav{display:grid;gap:3px;margin:22px 0}.sidebar nav a{padding:11px 13px;color:#56715e;border-radius:9px;font-weight:750;font-size:12px}.sidebar nav a:hover,.sidebar nav a:focus{background:#edf5e9;color:#265d3b}.sidebar-note{margin-top:auto;border:1px solid #dbead7;background:#f1f8ee;padding:18px;border-radius:14px;font-size:10px;font-weight:850;letter-spacing:.07em;color:#468354}.sidebar-note p{font-size:11px;line-height:1.7;letter-spacing:0;font-weight:480;color:#557661;margin:10px 0 0}.green-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#75b773;margin-right:6px}
.workspace-main{padding:38px 34px 65px;max-width:1350px;width:100%;min-width:0}.page-intro{display:flex;justify-content:space-between;align-items:center;gap:18px}.page-intro h1{font-size:37px;letter-spacing:-.065em;line-height:1.15;margin:9px 0 7px}.page-intro p{color:#5c7b64;margin:0;font-size:13px}.status-pill{background:#e1f0df;color:#327748;font-size:10px;letter-spacing:.1em;font-weight:880;border-radius:99px;padding:10px 13px;white-space:nowrap}.notice{display:flex;align-items:start;gap:14px;background:#e9f5e6;border:1px solid #d3e8ce;border-radius:13px;padding:16px 20px;margin:23px 0;color:#456c51;font-size:12px}.notice strong{color:#316741}.notice-icon{font-size:22px;color:#75a978;line-height:1}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:23px 0}.metric{background:white;border:1px solid var(--line);border-radius:16px;padding:20px 23px;min-height:154px;display:flex;flex-direction:column}.metric.featured{background:linear-gradient(125deg,#225438,#347a4d);border-color:#2c7547;color:white}.metric>span{font-size:10px;letter-spacing:.11em;font-weight:870;color:#6e9677}.metric.featured>span{color:#c4e5c6}.metric strong{font-size:40px;letter-spacing:-.07em;margin-top:12px;line-height:1.2}.metric small{color:#57765f;font-size:11px;margin-top:6px}.metric.featured small{color:#d1e8d1}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px;scroll-margin-top:16px;margin-bottom:18px}.panel-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:18px}.panel h2{font-size:23px;letter-spacing:-.05em;line-height:1.2;margin:6px 0}.panel-heading p{color:#617d68;font-size:12px;line-height:1.7;margin:4px 0}.panel h3{font-size:14px;letter-spacing:-.02em;margin:20px 0 10px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.horizontal-form{display:flex;align-items:end;gap:11px;flex-wrap:wrap}.horizontal-form label.grow{flex:1;min-width:155px}.stack-form{gap:11px}.form-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stack-form button{justify-self:start}.item-list{display:grid;gap:8px;margin-top:20px}.item{border:1px solid #e4eee1;background:#f8fbf7;border-radius:11px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px;color:#486a52}.item span{overflow-wrap:anywhere}.item small{display:block;font-size:10px;color:#668675}.item button{border:1px solid #c5ddc3;color:#3e7450;background:#ecf6e9;border-radius:8px;padding:6px 10px;font-size:11px;font-weight:760;white-space:nowrap}.item button:hover{background:#daf0d9}.helper{font-size:11px;color:#637e68;line-height:1.7;margin:14px 0 0}.billing-state{background:#eaf5e8;color:#366447;border-radius:11px;padding:17px;line-height:1.7;font-weight:760;font-size:13px}.backup-codes{white-space:pre-wrap;background:#f1f7ef;border:1px dashed #86b08a;color:#326b40;border-radius:13px;text-align:center;padding:20px;letter-spacing:.1em;font-weight:780;font-size:14px;line-height:2}
#message{position:fixed;right:20px;bottom:24px;max-width:440px;background:#265d3c;color:white;border-radius:13px;padding:15px 19px;box-shadow:0 18px 43px #1d482b40;z-index:99;font-size:13px;font-weight:750}#message.error{background:#8c3f36}footer{text-align:center;color:#718a76;font-size:11px;padding:21px}
@media(max-width:1250px){.workspace-layout{grid-template-columns:220px minmax(0,1fr)}.workspace-main{padding:32px 24px 55px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.two-columns{grid-template-columns:1fr}.auth-panel,.hero-panel{padding:46px 36px}}@media(max-width:820px){.workspace-layout{display:block}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:20px 22px;gap:12px}.sidebar nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:9px 0}.sidebar nav a{padding:9px;font-size:11px}.sidebar-note{display:none}.auth-wrap{grid-template-columns:1fr}.hero-panel{min-height:300px}.mock-preview{max-width:460px}.workspace-main{padding:30px 18px}}@media(max-width:570px){.site-header{min-height:70px;padding:14px 16px}.logo{font-size:18px}.logo-mark{height:36px;width:36px;font-size:23px}.preview-tag{font-size:9px;letter-spacing:0;padding:7px 8px}.auth-wrap{width:calc(100% - 22px);margin:18px auto}.auth-panel,.hero-panel{padding:29px 22px;border-radius:17px}.auth-panel h1,.hero-panel h2{font-size:40px}.hero-panel{min-height:0}.workspace-main{padding:24px 12px}.page-intro h1{font-size:31px}.status-pill{display:none}.metrics{gap:9px}.metric{min-height:130px;padding:16px}.metric strong{font-size:32px}.panel{padding:18px;border-radius:14px}.sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr))}.form-two{grid-template-columns:1fr}.horizontal-form button{width:100%}.stack-form button{width:100%}.item{flex-wrap:wrap}.item button{min-height:38px}.preview-tag{max-width:135px;text-align:center}.header-right{gap:5px}footer{padding:16px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.primary-button{transition:none}}

/* v0.9 — accessible activity, privacy, install and commissioning readiness */
.gateway-status{padding:14px 17px;background:#f2f5eb;border:1px solid #e3ead9;color:#52704e;border-radius:12px;font-size:12px;font-weight:800}
.readiness-list{margin:15px 0 0;padding-left:23px;color:#5c795f;font-size:12px;line-height:2}
.privacy-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.danger-outline{color:#984633;background:#fff7f4;border-color:#f1d0c5}
.danger-outline:hover{background:#ffebe5}
.preview-plans{display:grid;gap:8px;margin-top:14px}
.preview-plans>div{padding:13px 15px;background:#f5faf4;border:1px solid #e1ecdd;border-radius:12px}
.preview-plans strong,.preview-plans small{display:block}
.preview-plans strong{font-size:13px;color:#315c42}
.preview-plans small{font-size:11px;color:#65806d;margin-top:3px}
#activity-list .item time{font-size:10px;color:#6d8972;white-space:nowrap}
#activity-list .item{align-items:flex-start}
#privacy-panel a{text-decoration:underline}
#install-app{background:#e5f3e3;border-radius:11px;padding:8px 13px;white-space:nowrap}
@media(max-width:570px){#install-app{font-size:11px}.privacy-actions{display:grid}.privacy-actions button{width:100%}.readiness-list{font-size:11px}}

/* v0.12 — independent SmartEagles SmartHome product UI, not the old home portal. */
.home-atmosphere{
  position:relative;isolation:isolate;overflow:hidden;display:grid;
  grid-template-columns:minmax(0,1fr) 280px;align-items:center;gap:24px;
  padding:35px 42px;background:
    radial-gradient(circle at 92% 22%,#458b5a 0,#22583b 37%,transparent 65%),
    linear-gradient(125deg,#132e22,#205539);color:#fff;
  border-radius:22px;box-shadow:0 16px 45px #163d2717;margin:12px 0 24px;
  min-height:295px
}
.home-atmosphere::before{
  content:'';position:absolute;inset:0;z-index:-1;opacity:.18;
  background-image:radial-gradient(#fff 1px,transparent 1px);
  background-size:28px 28px;mask-image:linear-gradient(90deg,transparent,black)
}
.atmosphere-kicker{color:#b6d9a4}
.home-atmosphere h2{font-size:clamp(30px,3.6vw,48px);letter-spacing:-.066em;
  line-height:1.12;margin:13px 0 17px}
.home-atmosphere h2 em{font-style:normal;color:#a7d3ab}
.home-atmosphere p{max-width:460px;font-size:13px;line-height:1.75;color:#d3e7d3;margin:0}
.atmosphere-tags{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:22px}
.atmosphere-tags span{font-size:10px;font-weight:750;color:#e4f3dc;border:1px solid #bbdcb747;
  background:#ffffff16;padding:6px 11px;border-radius:30px}
.atmosphere-decoration{height:222px;display:grid;place-items:center;position:relative}
.atmo-orbit{position:absolute;width:216px;height:216px;border-radius:50%;border:1px solid #e1f8d25b;
  box-shadow:0 0 0 28px #d9efcd0d,0 0 0 54px #e0f0d506}
.atmo-core{width:130px;height:130px;background:linear-gradient(145deg,#97cba2,#e8f9d7);
  border-radius:37px;box-shadow:0 16px 45px #06180f51,0 0 0 13px #ffffff19;
  display:grid;place-items:center;font-size:72px;color:#256245;transform:rotate(-7deg)}
.atmo-dot{position:absolute;display:grid;place-items:center;color:#d9efd5;
  border-radius:13px;background:#ffffff28;border:1px solid #d1efcf44;
  font-size:22px;box-shadow:0 8px 18px #091e1233}
.atmo-dot.dot-one{left:1%;top:7%;height:42px;width:42px}
.atmo-dot.dot-two{right:5%;top:20%;height:44px;width:44px}
.atmo-dot.dot-three{right:13%;bottom:3%;height:40px;width:40px}
.gateway-chip{align-self:flex-start;background:#eaf5e8;border:1px solid #d9e9d5;
  color:#3b7850;font-weight:850;font-size:10px;padding:8px 12px;letter-spacing:.055em;
  border-radius:30px;white-space:nowrap}
.device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.smart-device{position:relative;background:linear-gradient(150deg,#fff,#f9fcf7);
  border:1px solid #e0ebdc;border-radius:17px;min-width:0;padding:20px;
  box-shadow:0 8px 23px #254f3008;transition:box-shadow .18s,transform .18s}
.smart-device:hover{box-shadow:0 16px 32px #244f3012;transform:translateY(-2px)}
.smart-device-head{display:flex;align-items:center;gap:11px;min-height:58px}
.smart-device-icon{height:51px;width:51px;flex:none;background:#e9f6e7;color:#3b9053;
  border-radius:15px;display:grid;place-items:center;font-size:27px}
.smart-device-plug .smart-device-icon{background:#eaf1fb;color:#497ba0}
.smart-device-sensor .smart-device-icon{background:#fbf2e5;color:#a57d40}
.smart-device-title{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}
.smart-device-title strong{font-size:14px;color:#2a5238;overflow-wrap:anywhere}
.smart-device-title small{font-size:11px;color:#79917a}
.device-status{font-weight:850;font-size:9px;white-space:nowrap;
  color:#8b9185;border-radius:20px;background:#f0f2eb;padding:6px 8px}
.device-status.on{color:#3c9254;background:#e7f5e7}
.smart-device-controls{display:flex;justify-content:space-between;align-items:center;
  gap:12px;margin:22px 0 1px;border-top:1px solid #edf2e9;padding-top:18px}
.power-state{font-size:13px;font-weight:780;color:#507459}
.virtual-toggle{border:1px solid #c3d8c5;border-radius:10px;
  min-width:105px;background:#eef6ec;color:#3a6d47;padding:9px 13px;font-size:11px;font-weight:800}
.virtual-toggle.active{background:#326d47;color:#fff;border-color:#326d47}
.virtual-toggle:hover{filter:brightness(.96)}
.virtual-toggle:disabled{opacity:.42}
.brightness-wrap{display:block;margin-top:17px}
.brightness-caption{display:flex;justify-content:space-between;color:#728976;
  gap:14px;font-size:11px;margin-bottom:9px}
.brightness-caption b{color:#336f47}
.brightness-wrap input[type=range]{accent-color:#458d59;width:100%;cursor:pointer}
.brightness-wrap input[type=range]:disabled{cursor:not-allowed}
.smart-readings{display:flex;gap:23px;flex-wrap:wrap;padding-top:25px;color:#365f46;
  font-weight:870;font-size:28px;letter-spacing:-.055em}
.smart-readings>div+div{font-size:14px;letter-spacing:-.02em;color:#79917a;align-self:center}
.device-footnote{font-size:10px;color:#7c967c;margin:9px 0 0}
.gateway-status.connected{background:#e3f4e6;border-color:#c7e3c8;color:#2a7842}
.gateway-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.gateway-actions .primary-button{min-height:44px;display:inline-flex;justify-content:center;
  background:#2b6843;font-size:12px;padding:11px 16px}
.onboarding-hint{background:#f6faf3;border:1px solid #e0edde;padding:15px;border-radius:13px;
  display:flex;align-items:flex-start;gap:14px;margin-top:18px}
.onboarding-icon{display:grid;place-items:center;flex:none;height:42px;width:42px;
  border-radius:12px;background:#e4f2e0;color:#438354;font-size:22px}
.onboarding-hint p{color:#637d68;font-size:11px;line-height:1.7;margin:0}
.onboarding-hint strong{color:#365f43}
.pairing-box{margin-top:16px;padding:17px;border-radius:13px;
  border:1px dashed #a8c5aa;background:#fafdf8;overflow-wrap:anywhere}
.pairing-box strong{font-size:13px;color:#315d40}
.pairing-box p{font-size:11px;color:#637c69}
.pairing-box code{display:block;border-radius:9px;background:#eaf2e8;color:#30593e;
  padding:12px;font:11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;
  word-break:break-all;margin-bottom:12px;user-select:all}
@media(max-width:1250px){
  .home-atmosphere{grid-template-columns:minmax(0,1fr) 210px}
  .atmo-orbit{width:170px;height:170px}
  .atmo-core{height:100px;width:100px;font-size:57px}
}
@media(max-width:760px){
  .home-atmosphere{grid-template-columns:1fr;min-height:260px;padding:29px 24px}
  .atmosphere-decoration{display:none}
  .device-grid{grid-template-columns:1fr}
  .gateway-chip{margin-left:auto}
}
@media(max-width:450px){
  .home-atmosphere{padding:24px 20px;min-height:245px}
  .home-atmosphere h2{font-size:31px}
  .atmosphere-tags{gap:5px}
  .atmosphere-tags span{font-size:9px;padding:5px 8px}
  .smart-device{padding:15px}
  .smart-device-head{flex-wrap:wrap}
  .device-status{margin-left:auto}
  .gateway-actions{display:grid;grid-template-columns:1fr}
  .gateway-actions button{width:100%}
}
@media(prefers-reduced-motion:reduce){
  .smart-device{transition:none}.smart-device:hover{transform:none}
}

/* v0.13 — interactive virtual sensor triggers with bounded input fields */
.sensor-rule-form{border-top:1px solid #dceadb;margin-top:20px;padding-top:18px}
.sensor-rule-form h3{margin:2px 0 0;color:#38674b;font-size:15px}
.sensor-rule-form>p{margin:0 0 7px}
.sensor-demo-form{border-top:1px solid #e7efe6;margin-top:15px;padding-top:14px;display:grid;gap:11px}
.sensor-demo-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sensor-demo-fields label{display:grid;gap:5px;font-size:10px;color:#5d8065;font-weight:760}
.sensor-demo-fields input{border:1px solid #cfdfce;border-radius:9px;padding:10px;
  color:#2d5b40;width:100%;min-width:0;background:#fbfefa;min-height:40px}
.sensor-demo-form button{justify-self:start;font-size:11px}
@media(max-width:570px){.sensor-demo-fields{grid-template-columns:1fr 1fr}
.sensor-demo-form button{justify-self:stretch;width:100%}}

/* v0.14 — coordinator compatibility remains advisory, not live pairing. */
.hub-compat{border-top:1px solid #e0edde;margin-top:22px;padding-top:18px}
.hub-compat h3{font-size:15px;color:#315f41;margin:7px 0 8px}
.hub-compat .helper{font-size:11px;line-height:1.7}
.hub-compat .stack-form{margin-top:13px}
.hub-compat label.checkline{display:flex;align-items:flex-start;gap:8px;
  font-size:11px;line-height:1.45;color:#52725a}
.hub-compat label.checkline input{width:15px;height:15px;flex:none;accent-color:#39764c}
#zhub-readiness{padding:12px 15px;background:#f1f8ef;border-radius:12px;
  border:1px solid #e0eede;color:#315b41;margin:14px 0 0}

/* v0.15 — hardware pilot onboarding remains request-only and read-only. */
.pilot-actions{display:grid;gap:11px;margin-top:16px;border-top:1px solid #e4ebe2;padding-top:16px}
.pilot-actions label{display:grid;gap:7px;font-size:11px;font-weight:700;color:#46684e}
.pilot-actions select{min-height:42px;border:1px solid #d0e0cc;border-radius:10px;
  background:#fbfefa;padding:9px;color:#345a41;max-width:100%}
.pilot-actions button{justify-self:start}
#hardware-pilot-status{padding:13px;border-radius:11px;
  border:1px solid #dcebd9;background:#f4faf2;line-height:1.6;margin-top:12px}
.pilot-observations{margin-top:16px;border-top:1px solid #e0eadc;padding-top:14px}
.pilot-observations h3{font-size:13px;color:#38654a}
.pilot-observations .item{display:flex;flex-wrap:wrap;gap:12px;font-size:11px}
@media(max-width:560px){.pilot-actions button{justify-self:stretch;width:100%}}


/* Guided per-home Zigbee onboarding; no credentials or hardware controls in browser. */
.zigbee-setup{margin:20px 0 22px;padding:21px;border:1px solid #cfe2d0;
  background:linear-gradient(145deg,#f5fbf3,#fff);border-radius:16px}
.zigbee-setup-header h3{margin:5px 0 8px;color:#244b33;font-size:20px;line-height:1.2}
.zigbee-setup-header .helper{max-width:75ch}
.setup-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:19px 0 15px}
.setup-progress span{font-weight:750;font-size:10px;padding:9px 4px;text-align:center;
  color:#668373;background:#e9f1e7;border:1px solid #d8e7d5;border-radius:8px}
.setup-progress span.current{color:#fff;background:#276d49;border-color:#276d49}
.setup-progress span.complete{background:#d7ebd9;color:#2e6246;border-color:#c8e1cc}
#setup-stage-title{margin:14px 0 12px;font-size:14px;color:#345c42}
.setup-step{display:grid;gap:12px;line-height:1.55}
.setup-step[hidden],.setup-step [data-setup-method][hidden]{display:none!important}
.setup-step label:not(.setup-check){font-size:11px;font-weight:750;display:grid;gap:8px;color:#3d614a}
.setup-step select{width:100%;min-height:43px;border:1px solid #bfd6c3;border-radius:9px;
  padding:10px;background:white;color:#1f5139}
.setup-step .helper{margin:0}
.setup-step h4{margin:4px 0 1px;font-size:13px;color:#2d573d}
.setup-warning{margin:0;background:#fff9e8;border:1px solid #eddbab;border-radius:9px;
  padding:12px 13px;font-size:11px;line-height:1.65;color:#755c24}
.setup-check{display:flex;align-items:start;gap:10px;line-height:1.6;font-size:12px;
  font-weight:600;color:#385e45;padding:9px;background:#f1f7f0;border-radius:10px}
.setup-check input{flex:none;margin-top:4px;accent-color:#26764c;min-width:16px;min-height:16px}
.setup-method-label{margin:0;font-weight:800;color:#295d3f}
.setup-fields{border-collapse:collapse;width:100%;font-size:11px;table-layout:fixed}
.setup-fields th,.setup-fields td{text-align:left;vertical-align:top;line-height:1.6;
  border-bottom:1px solid #dce8dd;padding:10px 9px;overflow-wrap:anywhere}
.setup-fields th{width:35%;color:#2c5c40}
.setup-fields td{color:#486957}
.setup-host{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:12px;border-radius:10px;background:#ecf6ee;padding:12px}
.setup-host code{font-size:12px;overflow-wrap:anywhere;color:#1d5b3b}
.setup-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:17px}
.setup-actions button{min-height:40px}
.setup-actions button[hidden]{display:none}
.setup-actions button:disabled{opacity:.48;cursor:not-allowed}
.setup-status,.setup-request-status{margin:12px 0 0;color:#2d5a3f;background:#e8f3e7;
  border-radius:9px;border:1px solid #d6e8d3;font-size:11px;line-height:1.6;padding:11px 13px}
@media(max-width:660px){.zigbee-setup{padding:15px}.setup-progress{grid-template-columns:repeat(2,minmax(0,1fr))}
 .setup-actions button{flex:1 1 calc(50% - 8px)}.setup-fields th{width:37%}}


/* Quick Connect: primary, tenant-scoped registration, before optional advanced help. */
.quick-connect{background:linear-gradient(155deg,#f1faf0 0%,#fff 80%);border:1px solid #cee3cf;
  border-radius:18px;padding:24px;margin:20px 0 14px;box-shadow:0 8px 26px #1b5d3520}
.quick-connect-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.quick-connect-heading h3{font-size:23px;color:#214e36;letter-spacing:-.6px;margin:6px 0 9px;line-height:1.2}
.quick-connect-heading p{font-size:12px;color:#597663;line-height:1.65;max-width:65ch}
.quick-connect-symbol{width:50px;height:50px;display:grid;place-items:center;
  border-radius:15px;background:#d5e9d7;color:#317453;font-size:32px;flex:none}
.quick-connect-form{display:grid;gap:14px;margin-top:16px}
.quick-connect-form label:not(.quick-consent){display:grid;gap:8px;font-weight:750;
  font-size:11px;color:#355f45}
.quick-connect-form input[type=text],.quick-connect-form select{
  min-height:46px;border:1px solid #c0d9c2;border-radius:10px;background:#fff;color:#1c5338;
  padding:10px 12px;min-width:0;width:100%;font-size:12px}
.quick-connect-form input[type=text]{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.quick-connect-form input:focus-visible,.quick-connect-form select:focus-visible{outline:2px solid #458c5f;outline-offset:2px}
.quick-connect-form .helper{font-size:11px;line-height:1.5;margin:-2px 0 0}
.quick-consent{font-size:11px;display:flex;align-items:start;gap:10px;color:#486952;line-height:1.5}
.quick-consent input{width:17px;height:17px;flex:none;margin-top:2px;accent-color:#287c4e}
.quick-connect-form button{justify-self:start;min-height:44px}
.quick-connect-form button:disabled{opacity:.5;cursor:not-allowed}
.quick-help{margin-top:16px;border-top:1px solid #e1ebe0;padding-top:12px}
.quick-help summary{cursor:pointer;font-weight:750;color:#276e4a;font-size:12px}
.quick-help p{font-size:11px;color:#50705d;line-height:1.7;margin:10px 0 0}
.quick-connect-live{border:1px solid #d7e7d5;background:#f6fbf5;border-radius:13px;
  padding:15px;margin-top:18px}
.quick-connect-live-header{display:flex;gap:12px;justify-content:space-between;align-items:center}
.quick-connect-live-header strong{font-size:13px;color:#315b3f}
.quick-connect-live-header button{font-size:11px}
#quick-connect-status{font-size:11px;color:#37644a;line-height:1.6;margin:12px 0}
.quick-connect-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.quick-connect-checks span{display:flex;align-items:center;justify-content:space-between;gap:7px;
  background:#fff;border:1px solid #e1ede0;padding:10px;border-radius:9px;font-size:10px;color:#5e7968}
.quick-connect-checks strong{text-align:right;color:#416e50;font-weight:750}
.quick-connect-caution{font-size:10px;line-height:1.65;color:#765f32;padding:12px 14px;
  background:#fff9eb;border:1px solid #eedfb9;border-radius:11px;margin:14px 0 0}
.quick-advanced{border:1px solid #d8e9d9;border-radius:12px;padding:16px;margin:10px 0 15px}
.quick-advanced>summary{cursor:pointer;font-size:12px;font-weight:800;color:#3e7250}
.quick-advanced[open]>summary{padding-bottom:13px;border-bottom:1px solid #dde8da}
.quick-advanced .zigbee-setup{margin-top:16px}
@media(max-width:660px){.quick-connect{padding:18px}.quick-connect-heading h3{font-size:19px}
  .quick-connect-symbol{display:none}.quick-connect-form button{width:100%}
  .quick-connect-checks{grid-template-columns:1fr}}


/* v0.19: operator-approved, read-only physical Zigbee observations */
.real-hardware-list{padding:20px;border-radius:16px;background:linear-gradient(155deg,#f4faf3,#fff);
  border:1px solid #d4e7d5;margin-top:16px}
.real-hardware-list .panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.real-hardware-list h3{margin:5px 0 8px;font-size:18px;color:#235136}
.real-hardware-list .helper{margin:0;font-size:11px;line-height:1.65;color:#5b7a63}
.real-hardware-list .gateway-chip{flex:none;background:#e1f0e0;color:#336447;
  border-radius:20px;padding:8px 10px;font-size:10px;font-weight:800}
.real-hardware-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:11px;margin-top:17px}
.real-hardware-card{display:grid;align-content:start;gap:9px;min-width:0;
  background:#fff;border:1px solid #ddeadd;border-radius:12px;padding:14px;
  box-shadow:0 5px 15px #235c3811}
.real-hardware-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}
.real-hardware-card-head strong{font-size:12px;color:#24543a;line-height:1.45;overflow-wrap:anywhere}
.real-hardware-card-head .device-status{flex:none;font-size:9px;font-weight:800}
.real-hardware-meta{font-size:10px;line-height:1.6;color:#62806b;margin:0}
.real-hardware-reading{font-size:12px;line-height:1.6;color:#2d5f40;font-weight:700;margin:0;overflow-wrap:anywhere}
.real-hardware-footnote{font-size:10px;color:#718674;border-top:1px solid #edf2ec;
  margin-top:5px;padding-top:9px}
@media(max-width:580px){
  .real-hardware-list{padding:13px}
  .real-hardware-grid{grid-template-columns:1fr}
  .real-hardware-list .panel-heading{flex-wrap:wrap}
}

/* Quick Connect: return visitors to verified connection state, not a second key form. */
.quick-linked{display:flex;gap:13px;align-items:flex-start;margin:16px 0 4px;
  padding:16px;border-radius:12px;background:#eaf5e9;border:1px solid #c8e4ca;color:#25563a}
.quick-linked[hidden]{display:none!important}
.quick-linked-icon{width:30px;height:30px;display:grid;place-items:center;flex:none;
  background:#276d49;color:#fff;border-radius:50%;font-weight:800;font-size:15px}
.quick-linked-body{display:grid;gap:9px;min-width:0}
.quick-linked-body strong{font-size:13px;color:#22533b}
.quick-linked-body p{margin:0;font-size:11px;line-height:1.6;color:#3e684c}
.quick-linked-body button{justify-self:start;min-height:40px}
.quick-linked-body button:disabled{opacity:.5;cursor:not-allowed}

/* Authenticated workspace pages: one view at a time, not landing-page anchors. */
.workspace-main > .two-columns{display:contents}
.workspace-layout .sidebar nav button{display:block;width:100%;padding:11px 13px;border:0;border-radius:9px;text-align:left;background:transparent;color:#56715e;font:inherit;font-size:12px;font-weight:750;line-height:1.65;cursor:pointer}
.workspace-layout .sidebar nav button:hover,.workspace-layout .sidebar nav button:focus-visible{background:#edf5e9;color:#265d3b}
.workspace-layout .sidebar nav button.active{background:#e4f2e3;color:#215c38;box-shadow:inset 3px 0 #448b5b}
.workspace-layout .sidebar nav button span[aria-hidden]{display:inline-block;min-width:19px}
@media(min-width:821px){.workspace-layout .sidebar{position:sticky;top:0;max-height:100dvh;overflow-y:auto;align-self:start}}
@media(max-width:820px){.workspace-layout .sidebar{position:static;max-height:none;overflow:visible}.workspace-layout .sidebar nav{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;margin:8px 0;padding-bottom:5px}.workspace-layout .sidebar nav button{flex:0 0 auto;width:auto;min-height:44px;white-space:nowrap}.workspace-layout .sidebar nav button.active{box-shadow:inset 0 -3px #448b5b}}

/* Device inventory: physical telemetry and virtual controls are visually separated. */
#controls-panel>.panel-heading{align-items:center}
#controls-panel>.panel-heading .secondary-button{flex:none;min-height:42px}
#controls-panel .pilot-observations{margin:2px 0 26px}
.real-devices-empty{margin:3px 0 25px;padding:17px 19px;border:1px dashed #c9ddcc;border-radius:13px;background:#f7fbf6;color:#55755c;font-size:12px;line-height:1.75}
.virtual-device-section{border-top:1px solid var(--line);padding-top:22px;margin-top:12px}
.virtual-device-section h3{font-size:19px;letter-spacing:-.04em;margin:4px 0 6px;color:#26553a}
.virtual-device-section .panel-heading p{font-size:12px}
@media(max-width:570px){#controls-panel>.panel-heading{flex-wrap:wrap}#controls-panel>.panel-heading .secondary-button{width:100%}.virtual-device-section{padding-top:18px}}

/* Local-only drafts alongside real read-only Zigbee observations. */
.real-hardware-grid{grid-template-columns:repeat(auto-fit,minmax(265px,1fr))}
.real-hardware-command-preview{border-top:1px solid #dce9db;padding-top:13px;margin-top:3px;display:flex;flex-direction:column;gap:9px}
.preview-kicker{font-size:10px;letter-spacing:.07em;color:#705026}
.preview-actual,.preview-intent{margin:0;font-size:11px;line-height:1.6;color:#5d7663}
.preview-intent{font-weight:800;background:#fff5e5;border:1px solid #f0dfbf;color:#76552c;padding:9px 11px;border-radius:9px}
.preview-controls{display:flex;gap:9px;align-items:end;flex-wrap:wrap}
.preview-controls .preview-action{flex:1 1 115px;min-height:44px;padding:10px}
.preview-temperature-label{display:flex;flex-direction:column;flex:1 1 115px;min-width:110px;gap:5px;font-size:11px;font-weight:750}
.preview-temperature-label input{width:100%;min-height:44px;padding:8px;border:1px solid #c9dccd;border-radius:9px}
.preview-capability-note{color:#798771;font-size:10px;line-height:1.5}
@media(max-width:570px){.real-hardware-grid{grid-template-columns:1fr}}

/* Read-only inventory: accurate status, searchable categories and premium mobile layout. */
.real-device-overview{padding:15px 17px;border:1px solid #d8e8d7;border-radius:13px;background:linear-gradient(110deg,#edf6ea,#fafdf8);margin:12px 0}
.real-device-overview strong{font-size:13px;color:#285a3a}
.real-device-overview p{font-size:11px;line-height:1.7;margin:6px 0 0;color:#536e5b}
.real-device-filter-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,230px);gap:12px;align-items:end;margin:14px 0 0}
.real-device-filter-row label{display:flex;flex-direction:column;gap:5px;color:#526f58;font-size:11px;font-weight:800}
.real-device-filter-row input,.real-device-filter-row select{min-height:43px;width:100%;border:1px solid #d1e4d2;border-radius:10px;background:white;padding:9px 11px;font-size:12px;color:#294e38}
.real-device-filter-row input:disabled,.real-device-filter-row select:disabled{opacity:.55}
.real-device-discovery{display:flex;flex-wrap:wrap;gap:6px;margin-top:3px}
.real-device-discovery>span{display:inline-flex;align-items:center;padding:5px 8px;border-radius:8px;font-size:10px;font-weight:750;line-height:1.5}
.real-device-category{background:#e9f4e9;color:#356b45}
.real-device-model{background:#f0f3f0;color:#667a69}
.real-device-health{background:#f9f4ea;color:#8a6632}
.real-health-recent{background:#e4f3e6;color:#286e41}
.real-health-offline{background:#fcece9;color:#9a5140}
.real-health-unobserved,.real-health-stale{background:#fff3df;color:#8a642c}
.hardware-preview-planner{border:1px solid #e0e9db;background:#f9fcf7;border-radius:16px;margin-top:23px;padding:20px}
.hardware-preview-planner h3{font-size:18px;line-height:1.3;color:#255a3a;margin:6px 0 8px}
.hardware-preview-planner>p{font-size:12px;color:#5c775e;margin:0 0 14px}
.preview-planner-controls{display:flex;gap:11px;align-items:end;flex-wrap:wrap}
.preview-planner-controls label{min-width:145px;flex:1 1 160px;display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:750;color:#526d56}
.preview-planner-controls select,.preview-planner-controls input{width:100%;min-height:44px;border:1px solid #cfdfcd;border-radius:9px;background:white;color:#234b34;padding:9px;font-size:12px}
.preview-planner-controls button{min-height:44px;flex:0 1 auto}
.preview-plan-result{border:1px solid #e3e5d9;background:#fff;padding:14px;margin-top:14px;border-radius:11px;line-height:1.65;font-size:12px;color:#41644c;overflow-wrap:anywhere}
.preview-plan-line{margin:5px 0}
.preview-plan-line:first-child{font-weight:850;color:#285c3e}
.quick-live-readiness ol{margin:10px 0 9px;padding-left:19px}
.quick-live-readiness li{margin:5px 0;line-height:1.6}
@media(max-width:720px){.real-device-filter-row{grid-template-columns:minmax(0,1fr)}.hardware-preview-planner{padding:15px}.preview-planner-controls button{width:100%}.real-device-overview{padding:13px}}


/* v0.21: isolated browser-only synthetic command lab */
.command-simulation-lab{margin-top:23px;padding:22px;border:1px solid #cfdecd;border-radius:18px;background:linear-gradient(145deg,#f9fcf8,#eef6eb);color:#254b36}
.lab-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.lab-top h3{font-size:23px;line-height:1.2;letter-spacing:-.04em;margin:6px 0}
.lab-top p{font-size:12px;line-height:1.7;max-width:720px;color:#56735e;margin:3px 0 14px}
.lab-pill{white-space:nowrap;font-size:10px;letter-spacing:.08em;font-weight:800;padding:8px 12px;border-radius:99px;background:#fff2d5;color:#866129;border:1px solid #e8d5a3}
.lab-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.lab-fields label{font-size:11px;color:#56725e;font-weight:850;display:flex;flex-direction:column;gap:6px}
.lab-fields select,.lab-fields input{min-height:44px;width:100%;border:1px solid #c9ddc9;border-radius:10px;background:white;padding:8px 11px;font-size:12px;color:#234c34}
.lab-current-state{margin:16px 0;padding:13px 16px;background:#fff;border:1px solid #ddeadd;border-radius:12px}
.lab-device-status{display:flex;align-items:center;justify-content:space-between;gap:12px}
.lab-device-status strong{font-size:14px}
.lab-online,.lab-offline{font-size:10px;font-weight:850;letter-spacing:.03em}
.lab-online{color:#2b864d}.lab-offline{color:#a55740}
.lab-state-values{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.lab-state-value{font-size:11px;color:#476954;background:#ecf5ed;padding:5px 8px;border-radius:7px}
.lab-buttons{display:flex;gap:9px;flex-wrap:wrap}
.lab-buttons button{min-height:44px;flex:1 1 165px}
.lab-secondary-buttons{margin-top:9px}
.lab-request-status{margin:16px 0 5px;font-size:12px;color:#647562;font-weight:750}
.lab-result{margin:0;background:white;border:1px solid #d7e3d2;border-radius:10px;padding:13px 15px;font-size:12px;line-height:1.65;min-height:48px}
.lab-history{margin-top:12px;font-size:12px;color:#536c55}
.lab-history summary{cursor:pointer;font-weight:750;padding:7px 0}
.lab-history ol{margin:8px 0 0;padding:6px 0 6px 22px;max-height:210px;overflow:auto}
.lab-history li{font-size:12px;padding:5px 0}
.lab-history li small{display:block;font-size:10px;color:#809282}
@media(max-width:790px){.lab-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.lab-top{flex-wrap:wrap}}
@media(max-width:520px){.command-simulation-lab{padding:15px;border-radius:14px}.lab-top h3{font-size:21px}.lab-fields{grid-template-columns:minmax(0,1fr)}.lab-buttons button{width:100%}.lab-pill{font-size:9px}}

/* Keep optional simulation tools compact on the real-device page. */
.virtual-tools{margin-top:24px;border-top:1px solid var(--line);padding-top:14px}
.virtual-tools>summary{min-height:44px;display:list-item;cursor:pointer;color:#28583b;font-weight:800;padding:12px 4px}
.virtual-tools>summary:focus-visible{outline:3px solid #3c8052;outline-offset:3px;border-radius:6px}
.site-header #signout{min-height:44px;white-space:nowrap}
@media(max-width:420px){.site-header .preview-tag{display:none}.site-header{gap:12px}}


/* Device-first home: telemetry stays distinct from optional local previews. */
.workspace-more {border-top:1px solid var(--line,#dce5dd);margin-top:8px;padding-top:8px;min-width:0}
.workspace-more > summary {cursor:pointer;padding:12px 14px;font-size:13px;font-weight:650;color:#385447;border-radius:10px;min-height:44px}
.workspace-more > button {width:100%}
.workspace-more:has([aria-current="page"]) > summary {background:#e4ede5;color:#183f2c}
.home-device-panel {background:transparent;border:0;box-shadow:none;padding:0}
.home-monitoring-note {padding:12px 16px;background:#e8efe9;color:#344d3d;border-radius:12px;margin:0 0 20px;font-size:13px;line-height:1.6}
.home-device-empty {background:#fff;border:1px dashed #b7c8bc;border-radius:20px;padding:32px;max-width:760px}
.home-device-empty h3 {font-size:25px;margin:12px 0}
.home-device-empty p {max-width:540px;line-height:1.7;color:#526258;margin-bottom:22px}
.home-device-card,.real-hardware-card {min-width:0;background:#fff;border:1px solid #dce5de;border-radius:20px;padding:0;overflow:hidden;box-shadow:0 3px 12px #15362504}
.real-hardware-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px;align-items:start}
.device-face {padding:22px;display:flex;flex-direction:column;align-items:stretch;min-height:290px;gap:0}
.device-face-top {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.device-glyph {width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:#edf3eb;color:#32593c;flex:none}
.device-glyph svg {width:24px;height:26px}
.device-freshness {font-size:11px;font-weight:600;line-height:1.4;text-align:right;color:#526258;padding:5px 8px;border-radius:8px;background:#f2f4ef}
.device-freshness.real-health-recent {background:#edf4e7;color:#36522e}
.device-freshness.real-health-offline,.device-alert .device-glyph {background:#f9e9e4;color:#843b28}
.device-freshness.real-health-stale {background:#f8f0df;color:#785b23}
.device-face-heading h3 {font-family:inherit;font-size:17px;font-weight:650;line-height:1.4;margin:0 0 4px;overflow-wrap:anywhere}
.device-face-category {font-size:12px;color:#59665d}
.device-primary-reading {display:flex;align-items:baseline;gap:7px;margin-top:24px;line-height:1.15}
.device-primary-reading strong {font-size:clamp(25px,3vw,36px);letter-spacing:-1px;font-weight:550;overflow-wrap:anywhere}
.device-reading-unit {font-size:18px;color:#68786d}
.device-reading-label {font-size:12px;color:#647368;margin-top:6px}
.device-secondary-readings {display:flex;gap:12px;flex-wrap:wrap;font-size:12px;color:#445b4b;margin-top:18px}
.device-reading-age {font-size:11px;color:#68766d;margin:12px 0 0;line-height:1.5}
.device-inspect {display:block;width:100%;border:0;border-top:1px solid #edf0e9;border-radius:0;background:#fafcf8;padding:14px 22px;text-align:left;color:#31543c;font:600 13px inherit;min-height:46px;cursor:pointer}
.device-inspect:hover {background:#edf3e9}
.device-detail {border-top:1px solid #e5ebe4;background:#fafbf8}
.device-detail > summary {padding:15px 20px;cursor:pointer;font-size:12px;font-weight:600;color:#405844;min-height:46px}
.device-detail > :not(summary) {margin-left:20px;margin-right:20px}
.device-detail > :last-child {margin-bottom:20px}
.device-detail .real-hardware-card-head {display:none}
.device-detail .real-hardware-meta,.device-detail .real-hardware-reading,.device-detail .real-hardware-footnote {font-size:12px;line-height:1.65}
.device-detail .real-hardware-command-preview {padding-top:14px}
#overview-metrics {order:0}
#overview .status-pill {white-space:nowrap}
@media(max-width:570px){
 .sidebar nav {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
 .sidebar nav > button {padding:10px 3px;display:flex;flex-direction:column;justify-content:center;gap:5px;font-size:10px;min-height:56px}
 .sidebar nav > button span {font-size:16px}
 .workspace-more {grid-column:1/-1;margin:0;padding:0;border:0}
 .workspace-more > summary {text-align:center;font-size:12px;padding:10px}
 .workspace-more[open] {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .workspace-more > summary {grid-column:1/-1}
 .workspace-more button {min-height:44px}
 .sidebar-note {display:none}
 .device-face {padding:20px;min-height:265px}
 .home-device-panel .panel-heading {align-items:start;gap:12px}
 .home-device-panel .panel-heading h2 {font-size:24px}
 .home-monitoring-note {font-size:12px}
 #overview-metrics {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #overview-metrics .metric {padding:12px 14px}
 #overview-metrics .metric strong {font-size:24px}
 #overview-metrics .metric small {font-size:10px}
}
@media(max-width:820px){
 .workspace-layout .sidebar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:16px 18px}
 .workspace-layout .sidebar > .eyebrow {grid-column:1/-1;margin:0;font-size:9px}
 .workspace-layout .sidebar label {min-width:0;font-size:12px}
 .workspace-layout .sidebar select {width:100%;min-width:0;padding:10px 8px;font-size:12px}
 .workspace-layout .sidebar nav {grid-column:1/-1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;margin:0;padding:0;gap:4px}
 .workspace-layout .sidebar nav > button {width:100%;min-width:0;padding:9px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;min-height:52px;white-space:normal;text-align:center}
 .workspace-layout .sidebar nav .workspace-more {grid-column:1/-1;margin:0;padding:0;border:0}
 .workspace-layout .sidebar nav .workspace-more > summary {padding:8px;min-height:36px;text-align:center}
 .workspace-layout .sidebar nav .workspace-more button {width:100%;white-space:normal}
 .workspace-layout .sidebar nav .workspace-more[open] {display:block}
 .workspace-layout .sidebar nav .workspace-more[open] button {display:inline-block;width:50%;vertical-align:top}
 #overview-notice {padding:10px 14px;font-size:12px;line-height:1.5}
 .page-intro {margin-bottom:16px}
}
summary:focus-visible {outline:3px solid #6aaa74;outline-offset:3px}


/* Customer portal: prototypes remain isolated and are never exposed as real controls. */
.customer-feature-note{display:none}
.customer-experience .virtual-tools,
.customer-experience #start-demo,.customer-experience #pair-gateway,
.customer-experience #pairing-box,.customer-experience .hardware-preview-planner,
.customer-experience .real-hardware-command-preview,
.customer-experience #scenes-panel>:not(.customer-feature-note){display:none!important}
.customer-experience .customer-feature-note{display:block;padding:12px 0;max-width:560px}
.customer-feature-note h2{margin:18px 0 12px}.customer-feature-note p{line-height:1.7;color:#526258}
.customer-experience .home-monitoring-note{border-left:3px solid #b0bda9;background:#f0f3ec}
.customer-experience #overview-notice{display:none}
.customer-experience .device-detail .real-hardware-footnote{display:none}
.customer-experience .device-face{min-height:260px}
.customer-experience .device-face-category{color:#647368}
.customer-experience .device-primary-reading strong{font-size:40px;font-weight:600}
.customer-experience .real-device-overview{background:transparent;padding:0;border:0}
.customer-experience #real-device-health-hint{font-size:12px;line-height:1.6;max-width:680px}
.customer-experience .site-header .preview-tag{font-size:10px;letter-spacing:.1em}
.customer-experience .real-hardware-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
@media(max-width:600px){
 .customer-experience .workspace-main{padding:0;min-width:0}
 .customer-experience .panel{padding:20px 16px}
 .customer-experience .home-device-panel{padding:0}
 .customer-experience .device-face{padding:20px;min-height:240px}
 .customer-experience .device-primary-reading strong{font-size:38px}
 .customer-experience .real-device-filter-row{grid-template-columns:1fr}
 .customer-experience .real-hardware-grid{gap:14px}
}

.physical-control-form{border-top:1px solid #dce5dc;padding:20px;display:grid;gap:12px}.physical-control-form label{display:grid;gap:6px;text-transform:capitalize}.physical-control-form p{font-size:13px;line-height:1.6}.physical-control-form button:disabled{opacity:.6}

.physical-power-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.physical-power-actions button{min-height:46px}.physical-control-form{margin-top:16px;padding-top:16px;border-top:1px solid var(--border,#dbe3e8)}

/* Physical telemetry freshness: never present old temperature as a current value. */
.device-reading-historical .device-primary-reading strong{
  color:#60735f
}
.device-reading-caution{
  display:block;
  align-self:flex-start;
  margin-top:10px;
  padding:8px 11px;
  background:#fff1d7;
  border:1px solid #e6d0a5;
  color:#765123;
  border-radius:9px;
  font-size:12px;
  line-height:1.5;
  font-weight:800
}
.device-reading-historical.device-alert .device-reading-caution{
  border-color:#e9bea8;
  background:#fff0e7;
  color:#93472d
}
@media(max-width:570px){.device-reading-caution{align-self:stretch}}

/* Device workspace — calm tiles and tactile climate controls. */
.customer-experience #controls-panel{background:transparent;border:0;padding:0;box-shadow:none}
#controls-panel>.panel-heading{align-items:center;margin-bottom:22px}
#controls-panel>.panel-heading h2{font-size:34px;letter-spacing:-1.2px;color:#172c28;margin:6px 0 8px}
#controls-panel>.panel-heading p{font-size:13px;color:#6f7d79;max-width:360px}
#controls-panel>.panel-heading .eyebrow{font-size:10px;letter-spacing:.16em;color:#69837b}
#refresh-real-devices{background:#fff;border:1px solid #dfe7e3;box-shadow:0 2px 4px #15362504;border-radius:12px;min-height:43px;white-space:nowrap;color:#325d4d}
.customer-experience #hardware-pilot-devices{border:0;background:transparent;padding:0;margin:0}
.device-toolbar-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.device-toolbar-summary .gateway-chip{background:#e5efe9;border:0;letter-spacing:0;text-transform:none;font-size:11px;font-weight:650;padding:7px 12px}
.device-toolbar-summary .helper{margin:0;color:#74817b;font-size:11px}
#controls-panel .real-device-filter-row{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px;margin:0 0 10px}
#controls-panel .real-device-filter-row label{font-size:10px;color:#75837d;gap:6px;font-weight:550;text-transform:uppercase;letter-spacing:.07em}
#controls-panel .real-device-filter-row input,#controls-panel .real-device-filter-row select{min-height:44px;border:1px solid #dfe7e3;border-radius:12px;background:#fff;font:500 12px inherit;text-transform:none;letter-spacing:0;color:#354f46;box-shadow:none}
.device-connection-details{font-size:11px;color:#73817b;margin:0 0 16px}
.device-connection-details summary{cursor:pointer;padding:8px 0;min-height:32px}
.device-connection-details[open]{border-bottom:1px solid #e0e8e2;padding-bottom:12px}
#real-device-visibility{margin:0 0 12px}#real-device-visibility:empty{display:none}
.customer-experience .real-hardware-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));gap:18px;align-items:start}
.customer-experience .real-hardware-card,.customer-experience .home-device-card{border:1px solid #dfe6e2;border-radius:23px;background:#fff;box-shadow:0 5px 20px #153b2b05}
.customer-experience .device-face{min-height:0;padding:21px 21px 18px}
.device-face-top{display:grid;grid-template-columns:42px minmax(0,1fr);column-gap:12px;row-gap:5px;margin-bottom:0}
.device-face-top .device-glyph{grid-column:1;grid-row:1/3;align-self:start;width:42px;height:42px;border-radius:14px}
.device-face-top .device-face-heading{grid-column:2;grid-row:1;min-width:0}
.customer-experience .device-face-heading h3{font-size:15px;line-height:1.4;font-weight:650;letter-spacing:-.2px;color:#243d34;margin:0 0 3px}
.device-face-top .device-freshness{grid-column:2;grid-row:2;justify-self:start;padding:0;background:none;font-size:10px;line-height:1.4;font-weight:500;text-align:left;color:#7b8982}
.device-face-top .device-freshness::before{content:'';display:inline-block;width:5px;height:5px;background:#b3bdb6;border-radius:50%;vertical-align:middle;margin-right:5px}
.device-face-top .device-freshness.real-health-recent::before{background:#599f76}
.device-face-top .device-freshness.real-health-stale::before{background:#c39a4b}
.device-face-top .device-freshness.real-health-offline::before{background:#c57d67}
.customer-experience .device-face-category{font-size:11px;color:#89958e}
.customer-experience .device-primary-reading{margin-top:24px;gap:4px}
.customer-experience .device-primary-reading strong{font-size:42px;font-weight:550;letter-spacing:-1.6px;color:#243e34;line-height:1.12}
.customer-experience .device-reading-text .device-primary-reading strong{font-size:26px;letter-spacing:-.7px;line-height:1.25}
.device-reading-label{font-size:11px;color:#849087}
.device-secondary-readings{gap:7px;margin-top:16px;font-size:10px;color:#687c70}
.device-secondary-readings span{border-radius:8px;padding:5px 8px;background:#f4f7f3}
.device-reading-age{font-size:10px;line-height:1.4;color:#8b978e;margin:12px 0 0}
.device-reading-caution{margin-top:9px;padding:5px 8px;border:0;background:#fff5e3;color:#916c32;border-radius:7px;font-size:10px;font-weight:550;line-height:1.4;align-self:flex-start}
.device-reading-historical .device-primary-reading strong{color:#65766a}
.device-face[data-sensor-type=water] .device-glyph{background:#ebf5fa;color:#528ca3}
.device-face[data-sensor-type=motion] .device-glyph{background:#f2edfa;color:#8870ac}
.device-face[data-sensor-type=climate] .device-glyph{background:#edf3ef;color:#5b8c71}
.device-detail{background:#fafcf9;border-color:#edf0eb}
.device-detail>summary{min-height:39px;padding:12px 21px;font-size:10px;font-weight:550;color:#78877c}
.climate-control-card{background:linear-gradient(165deg,#fff 20%,#fffcf6)!important}
.climate-control-card .device-glyph{background:#fbefda!important;color:#b58a42!important}
.customer-experience .climate-control-card .device-primary-reading{width:147px;height:147px;flex:none;align-items:baseline;justify-content:center;padding-top:43px;margin:22px auto 0;border:6px solid #f1eadb;border-top-color:#dfb779;border-left-color:#e5c18b;border-radius:50%;box-shadow:inset 0 0 0 5px #fff,0 4px 16px #97611e05;background:#fffcf7}
.customer-experience .climate-control-card .device-primary-reading strong{font-size:41px;color:#655337;font-weight:550}
.climate-control-card .device-primary-reading .device-reading-unit{font-size:15px;color:#aa9472}
.climate-control-card .device-reading-label{text-align:center;margin-top:8px;color:#95846a}
.climate-control-card .device-reading-caution{align-self:center;text-align:center;font-size:9px;max-width:100%}
.climate-control-card .device-reading-age{text-align:center;font-size:9px}
.climate-control-card .device-secondary-readings{justify-content:center;margin-top:10px}
.physical-control-form{border:0;margin:0;padding:0 21px 18px;gap:0;display:block}
.physical-control-form .physical-command-status{font-size:11px;color:#68816c;line-height:1.6;margin:10px 0 0}
.physical-command-status:empty{display:none}
.thermostat-adjustment{border-radius:16px;background:#f8f3e9;padding:14px 13px 10px;border:1px solid #f1e8d8}
.thermostat-caption{display:flex;justify-content:space-between;align-items:baseline;gap:8px;color:#85704d;font-size:10px;margin:0 2px 8px}
.thermostat-provenance{font-size:9px;color:#a0937e;text-align:right}
.temperature-stepper{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:8px}
.physical-control-form .temperature-step{width:48px;height:48px;min-height:48px;padding:0;border:1px solid #e8dec9;background:#fffdf8;border-radius:14px;font-size:28px;line-height:1;font-weight:400;color:#8f7548;box-shadow:0 2px 3px #99752b06;cursor:pointer;touch-action:manipulation;transition:background .15s,transform .15s}
.temperature-step:hover{background:#fff}.temperature-step:active{transform:scale(.94)}
.physical-control-form .temperature-step:disabled{opacity:.3;cursor:default;box-shadow:none}
.temperature-target{text-align:center;font-size:35px;line-height:1.2;font-weight:600;letter-spacing:-1.5px;color:#6e5937;font-variant-numeric:tabular-nums}
.temperature-target.is-draft{color:#a97427}
.temperature-help{display:block;text-align:center;font-size:9px;color:#a0937e;margin-top:9px;line-height:1.5}
.temperature-draft-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}
.temperature-draft-actions[hidden]{display:none}
.physical-control-form .temperature-apply{justify-self:stretch;min-height:41px;padding:10px 12px;font-size:12px;border-radius:11px;background:#866c43;border:0;color:white;box-shadow:none}
.physical-control-form .temperature-cancel{width:auto;min-height:41px;padding:8px;background:none;color:#978871;border:0;font-size:11px;cursor:pointer}
.power-control-card .device-glyph{background:#eaf1f8!important;color:#6483a5!important}
.physical-power-actions{gap:7px;background:#eef3f7;border:1px solid #e5ebf0;padding:5px;border-radius:15px}
.physical-power-actions .power-action{border:0;border-radius:11px;min-height:46px;padding:10px 8px;background:transparent;font:600 12px inherit;color:#71869b;cursor:pointer;touch-action:manipulation}
.physical-power-actions .power-action.is-reported{background:#fff;color:#3b6385;box-shadow:0 2px 5px #253f5512}
.physical-power-actions .power-action:hover{background:#fff}
#controls-panel button:focus-visible{outline:3px solid #70a892;outline-offset:3px}
@media(max-width:600px){
 .customer-experience #controls-panel{padding:20px 14px}
 #controls-panel>.panel-heading{align-items:flex-start;gap:10px;margin-bottom:18px}
 #controls-panel>.panel-heading h2{font-size:30px}
 #controls-panel>.panel-heading p{font-size:11px;max-width:210px}
 #refresh-real-devices{padding:9px 11px;font-size:11px;margin-top:24px}
 #controls-panel .real-device-filter-row{grid-template-columns:minmax(0,1fr) 126px;gap:9px}
 .device-toolbar-summary{gap:7px;margin-bottom:12px}
 .device-toolbar-summary .helper{font-size:10px}
 .customer-experience .real-hardware-grid{gap:15px}
 .device-reading-caution{align-self:flex-start}
}
@media(prefers-reduced-motion:reduce){.temperature-step{transition:none}}
/* Keep the control surface in reach on a phone; metadata stays in details. */
#controls-panel>.panel-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
#controls-panel>.panel-heading #refresh-real-devices{width:auto;margin:0;align-self:center}
#controls-panel .device-toolbar-summary .helper{display:none}
#controls-panel .device-toolbar-summary .gateway-chip{margin-left:0}
#controls-panel .device-reading-age{display:none}
#controls-panel .climate-control-card .device-face{padding-bottom:16px}
#controls-panel .climate-control-card .device-primary-reading{margin-top:17px}
@media(max-width:600px){
 #controls-panel>.panel-heading{gap:8px}
 #controls-panel>.panel-heading p{max-width:220px}
 #controls-panel .device-toolbar-summary{margin-bottom:13px}
}

/* Device management: names and rooms stay separate from hub identity. */
.device-page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.device-page-actions button{min-height:44px;white-space:nowrap}
.device-settings-button{margin-left:auto;align-self:flex-start;width:44px;height:44px;min-height:44px;border:1px solid #dce7df;border-radius:14px;background:#f5f9f6;color:#397153;font-size:21px;cursor:pointer}
.device-face-top .device-settings-button{grid-column:3;grid-row:1 / span 2}
.device-room-badge{display:inline-block;margin-top:7px;font-size:11px;color:#35664a;background:#e9f3ea;padding:3px 8px;border-radius:8px}
.device-management-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dbe8df;border-radius:24px;background:#fff;color:#1d332a;box-shadow:0 24px 90px #122a3540;overflow:auto}
.device-management-dialog::backdrop{background:#152d2866;backdrop-filter:blur(3px)}
.management-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid #e5ece6;background:#f5faf6;position:sticky;top:0;z-index:2}
.management-dialog-header h2{font-size:23px;margin:0}
.management-close{min-width:44px;min-height:44px;border:0;border-radius:12px;font-size:27px;background:#e7f0e8;color:#355c44;cursor:pointer}
.management-dialog-body{padding:24px;display:grid;gap:24px}
.management-dialog-body h3{margin:0 0 10px;font-size:18px}
.management-dialog-body p{font-size:13px;line-height:1.65;color:#66786d;margin:8px 0 16px}
.management-dialog-body button{min-height:44px;cursor:pointer}
.management-edit-form{display:grid;gap:16px}
.management-edit-form label{display:grid;gap:8px;font-size:12px;font-weight:700}
.management-edit-form input,.management-edit-form select{box-sizing:border-box;min-height:48px;width:100%;font:inherit;font-size:16px;border:1px solid #d9e5dc;border-radius:12px;padding:10px 12px;background:white;color:#244c35}
.management-text-button{border:0;background:transparent;color:#2e7751;justify-self:start;padding:0 4px;font-weight:700}
.management-pairing{background:#f1f8f1;border:1px solid #daeada;border-radius:18px;padding:20px}
.management-pairing>button{margin:0 6px 6px 0}
.management-removal{border-top:1px solid #e7ece7;padding-top:22px}
.management-removal p{margin-top:18px}
.management-danger-button{border:1px solid #ebd4cf;border-radius:12px;color:#9b3f36;background:#fff8f6;padding:10px 15px;font-weight:700}
.management-device-row{display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid #e0e9e2;border-radius:14px;padding:13px;margin-top:10px}
.management-device-row strong{display:block;font-size:14px;overflow-wrap:anywhere}
.management-device-row small{display:block;font-size:11px;color:#6d7e72;margin-top:5px}
.management-device-row button{flex-shrink:0}
.management-feedback{padding:0 24px 20px;margin:0;white-space:pre-line;color:#326547;font-size:13px;line-height:1.6}
.management-feedback:empty{padding:0}.management-feedback.is-error{color:#9d4536}
@media(max-width:600px){.device-workspace>.panel-heading{grid-template-columns:1fr}.device-page-actions{margin-top:10px}.device-page-actions #refresh-real-devices{margin:0!important}.management-dialog-header,.management-dialog-body{padding:18px}.management-device-row{flex-wrap:wrap}.device-settings-button{flex-shrink:0}.device-face-heading{min-width:0}.device-face-heading h3{overflow-wrap:anywhere}}

/* V2 device-report shortcuts: native accessible filter controls, no command path. */
.device-status-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 16px}
.device-status-shortcuts button{min-width:0;min-height:72px;padding:12px 15px;display:flex;align-items:flex-start;flex-direction:column;justify-content:space-between;gap:4px;background:#fff;border:1px solid #dce6df;border-radius:17px;color:#5b7066;cursor:pointer;text-align:left;font:inherit;touch-action:manipulation;transition:border-color .15s,box-shadow .15s,background .15s}
.device-status-shortcuts button span{font-size:11px;line-height:1.35;font-weight:600}
.device-status-shortcuts button strong{font-size:22px;line-height:1.1;font-weight:650;letter-spacing:-.7px;font-variant-numeric:tabular-nums;color:#264c3b}
.device-status-shortcuts [data-report-filter=attention] strong{color:#996f2f}
.device-status-shortcuts button:hover:not(:disabled){border-color:#a3bfad}
.device-status-shortcuts button[aria-pressed=true]{background:#edf6ee;border-color:#75a78b;box-shadow:inset 0 0 0 1px #75a78b}
.device-status-shortcuts button:focus-visible{outline:3px solid #74a78e;outline-offset:2px}
.device-status-shortcuts button:disabled{opacity:.65;cursor:default}
@media(max-width:600px){.device-status-shortcuts{gap:7px;margin-bottom:13px}.device-status-shortcuts button{padding:10px 9px;min-height:70px;border-radius:13px}.device-status-shortcuts button span{font-size:10px}.device-status-shortcuts button strong{font-size:20px}}
@media(prefers-reduced-motion:reduce){.device-status-shortcuts button{transition:none}}

/* Keep the Devices heading legible beside action buttons on narrow phones. */
@media(max-width:600px){
  #controls-panel>.panel-heading{grid-template-columns:minmax(0,1fr);gap:13px;align-items:stretch}
  #controls-panel>.panel-heading p{max-width:100%;margin-bottom:0}
  #controls-panel>.panel-heading .device-page-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;width:100%}
  #controls-panel>.panel-heading #manage-add-device{margin:0;min-width:0}
  #controls-panel>.panel-heading #refresh-real-devices{margin:0;min-width:0}
}

/* Make the *actual reported* setpoint legible beside the unsent editor value. */
.thermostat-caption{align-items:flex-start}
.thermostat-caption>span:first-child{font-size:11px;font-weight:600;line-height:1.4}
.thermostat-provenance{font-size:10px;font-weight:650;color:#6f6652;line-height:1.45;max-width:57%;overflow-wrap:normal}
.temperature-help{font-size:10px;line-height:1.45}

/* Devices: room grouping is a client-only filter of authorised room metadata. */
#controls-panel .real-device-filter-row{grid-template-columns:minmax(0,1fr) minmax(130px,180px) minmax(130px,165px)}
#controls-panel .real-device-filter-row>label{min-width:0}
#controls-panel .real-device-filter-row select{width:100%;min-width:0}
@media(max-width:600px){
 #controls-panel .real-device-filter-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 #controls-panel .real-device-filter-row>label:last-child{grid-column:1/-1}
}


/* Pairing and Zigbee compatibility are separate steps, with clear unsupported status. */
.management-available-status{border:1px solid #d4e7db;background:#f3faf5;border-radius:12px;padding:12px 14px;font-size:12px!important;line-height:1.55!important;color:#386148!important;margin:10px 0 15px!important}
.management-available-status.has-unsupported{background:#fff7ea;border-color:#eed7aa;color:#765624!important}
.management-unsupported-chip{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:38px;padding:8px 11px;border-radius:10px;background:#f8edda;color:#895f21;font-size:11px;font-weight:750}
.management-device-row .management-unsupported-reason{max-width:285px;color:#826a40;font-size:11px;line-height:1.45}
@media(max-width:600px){.management-unsupported-chip{width:100%;justify-content:flex-start}.management-available-status{margin-bottom:12px!important}}


/* V3: keyboard/touch-friendly reset of an ID-focused device view. */
#real-device-visibility .device-show-all{margin-left:8px;min-height:44px;padding:5px 10px;border:0;background:transparent;color:#276748;font:650 12px inherit;text-decoration:underline;cursor:pointer}
#real-device-visibility .device-show-all:focus-visible{outline:3px solid #70a892;outline-offset:2px;border-radius:6px}

/* SmartHome V3 — refined, accessible device interactions. */
.customer-experience .real-hardware-card{transition:box-shadow .16s ease,transform .16s ease;border-color:#d8e4dc;box-shadow:0 8px 28px #193d3010}
@media(hover:hover){.customer-experience .real-hardware-card:hover{box-shadow:0 14px 32px #163b2d18;transform:translateY(-2px)}}
.customer-experience .physical-control-form{padding-bottom:21px}
.customer-experience .thermostat-adjustment{background:linear-gradient(145deg,#faf6ed,#f6efdf);border-color:#e8dfca}
.customer-experience .temperature-target{font-variant-numeric:tabular-nums;font-weight:700}
.customer-experience .temperature-step{touch-action:manipulation;min-width:48px;min-height:48px}
.physical-power-actions{background:#e9f0f4;border-color:#dce5eb}
.power-report-label{font-size:11px!important;line-height:1.5!important;color:#3e6a59!important;text-align:center;margin:8px 0 0!important;font-weight:650}
.power-report-label.is-unverified{color:#916d38!important}
.management-refresh-button{min-height:44px;border:1px solid #cbdfd1;background:#fff;color:#285d43;border-radius:12px;font:650 12px inherit;padding:9px 14px;margin:0 0 8px;cursor:pointer;touch-action:manipulation}
.management-refresh-button:hover:not(:disabled){background:#ebf5ed}
.management-refresh-button:disabled{opacity:.5;cursor:progress}
.management-available{min-width:0}
.management-device-row.management-compatible{background:#f7fbf7;border-color:#b8dbbf}
.management-device-row .management-supported-reason{color:#427e55;font-weight:650}
.management-hub-status{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid #d6e7d8;border-radius:10px;padding:8px 10px;color:#315e46!important;background:#fff!important}
.management-pairing{background:linear-gradient(145deg,#f1f8f1,#f9fcf8)}
.management-device-row .secondary-button{min-height:44px}
.management-dialog-body{min-width:0}
@media(max-width:600px){
 .device-management-dialog[open]{box-sizing:border-box;display:flex;flex-direction:column;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:auto;border-radius:18px;overflow:hidden}
 .device-management-dialog .management-dialog-header{flex:0 0 auto;padding:14px 17px}
 .device-management-dialog .management-dialog-header h2{font-size:21px}
 .device-management-dialog .management-dialog-body{flex:1 1 auto;min-height:0;padding:17px;overflow-y:auto;overscroll-behavior:contain;gap:17px}
 .device-management-dialog .management-feedback:not(:empty){flex:0 0 auto;max-height:92px;overflow-y:auto;background:#f3f8f4;padding:9px 17px 13px;border-top:1px solid #e0eae3}
 .device-management-dialog .management-pairing{padding:16px}
 .device-management-dialog .management-available-status{padding:10px 12px}
 .device-management-dialog .management-refresh-button{width:100%;margin-bottom:4px}
 .device-management-dialog .management-device-row{padding:12px}
 .device-management-dialog .management-device-row .secondary-button{min-width:112px}
}
@media(prefers-reduced-motion:reduce){.customer-experience .real-hardware-card{transition:none}}

/* Device review; incomplete scenes and billing stay internal. */
.home-attention-link{width:100%;min-height:48px;margin:0 0 17px;display:flex;align-items:center;justify-content:space-between;border:1px solid #e6cf9f;background:#fff8e8;color:#74511e;padding:12px 16px;border-radius:13px;font:650 12px inherit;text-align:left;touch-action:manipulation}
.home-attention-link:after{content:'View devices  ›';font-size:11px;white-space:nowrap;margin-left:12px}
.home-attention-link:hover{background:#fff0cc}
.home-attention-link:focus-visible{outline:3px solid #dfb977;outline-offset:2px}
.customer-experience [data-preview-only],
.customer-experience #scenes-panel,
.customer-experience #billing-panel{display:none!important}
.customer-experience #scenes-panel>.customer-feature-note,
.customer-experience #automation-panel>.customer-feature-note{max-width:760px;padding:0 0 10px}
.activity-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 15px}
.activity-toolbar label{font-size:11px;font-weight:650;color:#56715e}
.activity-toolbar select{font-size:12px;min-height:44px;min-width:180px;max-width:100%;padding:9px 11px;color:#2d5940;border:1px solid #c9ddcd;border-radius:10px;background:#fff}
.activity-toolbar #activity-count{font-size:11px;color:#6e8573;margin-left:auto}
.quick-next-step{margin:14px 0 0!important;border:1px solid #cae0d0;background:#f6fbf7;border-radius:12px;padding:12px 14px;color:#285c3f!important;font-size:12px!important;line-height:1.65!important}
.theme-toggle{width:44px;height:44px;min-height:44px;flex:0 0 auto;border:1px solid #c8dbcd;background:#eef5ed;color:#23543a;border-radius:13px;font-size:22px;line-height:1;display:grid;place-items:center;cursor:pointer}
.theme-toggle:hover{background:#e2efe1}
.theme-toggle:focus-visible{outline:3px solid #6aaa74;outline-offset:2px}
@media(max-width:420px){.site-header{padding:12px 14px}.header-right{gap:5px}.header-right #signout{font-size:11px;padding:8px 5px}.theme-toggle{width:42px;height:42px}.home-attention-link{display:block}.home-attention-link:after{display:block;margin:5px 0 0}}

/* Opt-in dark mode. The preference contains no account or device data. */
:root[data-theme=dark]{color-scheme:dark;--ink:#f0f1f4;--green:#bec2cc;--leaf:#c2c5ce;--muted:#adb1bc;--line:#363941;--page:#0b0c0f;--white:#1d2026;color:#f0f1f4;background:#0b0c0f}
:root[data-theme=dark] body{background:#0b0c0f;color:#eceef2}
:root[data-theme=dark] .site-header,
:root[data-theme=dark] .sidebar{background:#15171c;border-color:#32363f;color:#f0f1f4}
:root[data-theme=dark] .workspace-main{background:#0b0c0f}
:root[data-theme=dark] .panel,
:root[data-theme=dark] .metric:not(.featured),
:root[data-theme=dark] .home-device-empty,
:root[data-theme=dark] .auth-panel,
:root[data-theme=dark] .item,
:root[data-theme=dark] .real-hardware-card,
:root[data-theme=dark] .home-device-card{background:#1b1e24;color:#e8eaf0;border-color:#393c45;box-shadow:none}
:root[data-theme=dark] .customer-experience .home-device-panel,
:root[data-theme=dark] .customer-experience #controls-panel{background:transparent!important;border:0;box-shadow:none}
:root[data-theme=dark] .customer-experience .real-hardware-card,
:root[data-theme=dark] .customer-experience .home-device-card{background:#1c1f25!important;border-color:#3c404a;box-shadow:0 9px 24px #0003}
:root[data-theme=dark] .customer-experience .climate-control-card{background:linear-gradient(165deg,#2c2c2c,#2b2b2b)!important}
:root[data-theme=dark] .device-face-heading h3,
:root[data-theme=dark] .customer-experience .device-primary-reading strong,
:root[data-theme=dark] .customer-experience .device-reading-label,
:root[data-theme=dark] .panel h2,
:root[data-theme=dark] .panel h3,
:root[data-theme=dark] .page-intro h1,
:root[data-theme=dark] .auth-panel h1,
:root[data-theme=dark] .quick-connect-heading h3{color:#f3f4f7!important}
:root[data-theme=dark] .customer-experience .device-face-category,
:root[data-theme=dark] .device-freshness,
:root[data-theme=dark] .device-reading-age,
:root[data-theme=dark] .panel-heading p,
:root[data-theme=dark] .page-intro p,
:root[data-theme=dark] .sidebar-note p,
:root[data-theme=dark] .home-device-empty p,
:root[data-theme=dark] .customer-feature-note p,
:root[data-theme=dark] .helper{color:#bbc0c9!important}
:root[data-theme=dark] .device-secondary-readings span,
:root[data-theme=dark] .device-secondary-readings .device-target-chip,
:root[data-theme=dark] .device-detail,
:root[data-theme=dark] .device-inspect,
:root[data-theme=dark] .quick-connect-live,
:root[data-theme=dark] .quick-connect-checks span,
:root[data-theme=dark] .hardware-preview-planner,
:root[data-theme=dark] .preview-plan-result,
:root[data-theme=dark] .home-monitoring-note,
:root[data-theme=dark] .quick-next-step,
:root[data-theme=dark] .notice{background:#272931!important;color:#dee1e8!important;border-color:#444853!important}
:root[data-theme=dark] .device-inspect:hover{background:#444444!important}
:root[data-theme=dark] .physical-control-form,
:root[data-theme=dark] .thermostat-adjustment,
:root[data-theme=dark] .physical-power-actions,
:root[data-theme=dark] .power-report-label{color:#e6e6e6!important}
:root[data-theme=dark] .thermostat-adjustment{background:#303030!important;border-color:#4c4c4c}
:root[data-theme=dark] .temperature-target,
:root[data-theme=dark] .thermostat-caption,
:root[data-theme=dark] .thermostat-provenance,
:root[data-theme=dark] .temperature-help{color:#e5e7ed!important}
:root[data-theme=dark] .climate-control-card .device-primary-reading{background:#2e2e2e!important;border-color:#515151!important;box-shadow:none!important}
:root[data-theme=dark] .climate-control-card .device-primary-reading strong{color:#eff0f4!important}
:root[data-theme=dark] .power-report-label.is-unverified{color:#e5cbb5!important}
:root[data-theme=dark] .device-reading-caution,
:root[data-theme=dark] .management-available-status.has-unsupported,
:root[data-theme=dark] .home-attention-link{background:#353535!important;border-color:#4d4d4d!important;color:#cccccc!important}
:root[data-theme=dark] .device-reading-historical .device-primary-reading strong{color:#c3c3c3!important}
:root[data-theme=dark] .quick-connect,
:root[data-theme=dark] .management-pairing,
:root[data-theme=dark] .management-device-row,
:root[data-theme=dark] .management-dialog-header,
:root[data-theme=dark] .device-management-dialog{background:#1d2026!important;border-color:#494949!important;color:#e9ebef!important}
:root[data-theme=dark] .quick-connect-live-header strong,
:root[data-theme=dark] .quick-connect-checks strong,
:root[data-theme=dark] #quick-connect-status,
:root[data-theme=dark] .management-dialog-body p,
:root[data-theme=dark] .device-management-dialog h2,
:root[data-theme=dark] .management-hub-status{color:#d8dbe2!important}
:root[data-theme=dark] .sidebar nav button,
:root[data-theme=dark] .sidebar select,
:root[data-theme=dark] .real-device-filter-row input,
:root[data-theme=dark] .real-device-filter-row select,
:root[data-theme=dark] .activity-toolbar select,
:root[data-theme=dark] input,
:root[data-theme=dark] select,
:root[data-theme=dark] textarea{background:#24262e!important;color:#eceef2!important;border-color:#545965!important}
:root[data-theme=dark] .device-status-shortcuts button,
:root[data-theme=dark] .quick-connect-form,
:root[data-theme=dark] .device-management-dialog button.secondary-button{background:#292b33!important;color:#e5e7ed!important;border-color:#545965!important}
:root[data-theme=dark] .device-status-shortcuts button strong{color:#edf0f4!important}
:root[data-theme=dark] .device-status-shortcuts button[aria-pressed=true]{background:#3b3f4a!important;border-color:#a6a6a6!important}
:root[data-theme=dark] .device-settings-button,
:root[data-theme=dark] .management-close,
:root[data-theme=dark] .theme-toggle,
:root[data-theme=dark] .temperature-step,
:root[data-theme=dark] .power-action.is-reported{background:#3d414b!important;border-color:#777777!important;color:#f0f2f5!important}
:root[data-theme=dark] .primary-button{background:#464b57!important;color:#fff}
:root[data-theme=dark] .secondary-button{background:#3c404b!important;color:#ebebeb!important;border-color:#636363!important}
:root[data-theme=dark] .activity-toolbar label,
:root[data-theme=dark] .activity-toolbar #activity-count,
:root[data-theme=dark] .item small,
:root[data-theme=dark] .item time{color:#b2b2b2!important}
:root[data-theme=dark] .quick-help>summary,
:root[data-theme=dark] .quick-connect-heading p,
:root[data-theme=dark] .quick-help p,
:root[data-theme=dark] .quick-connect-form label,
:root[data-theme=dark] .management-feedback{color:#d2d2d2!important}
:root[data-theme=dark] .preview-plan-line:first-child{color:#d5d5d5!important}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}

/* Dark-mode contrast refinements after 390px screenshot review. */
:root[data-theme=dark] .sidebar label,
:root[data-theme=dark] .sidebar .workspace-more summary,
:root[data-theme=dark] .sidebar .sidebar-note,
:root[data-theme=dark] .sidebar nav button,
:root[data-theme=dark] .header-right #signout{color:#d3d3d3!important}
:root[data-theme=dark] .metric>span,
:root[data-theme=dark] .metric small{color:#bcbcbc!important}
:root[data-theme=dark] .metric.featured>span,
:root[data-theme=dark] .metric.featured small{color:#e9e9e9!important}
:root[data-theme=dark] .home-device-card .device-face-category,
:root[data-theme=dark] .real-hardware-card .device-face-category{color:#c0c0c0!important}

/* V3 compatibility: keep pairing and converter status clearly separated. */
.management-available-status.has-unsupported{font-weight:650}
.management-unsupported-reason{max-width:340px!important}
.management-unsupported-chip{white-space:nowrap}
@media(max-width:600px){.management-device-row .management-unsupported-reason{max-width:100%}}

/* V3.3 in-app device notices: informative, never a safety alarm. */
.home-notice-center{border:1px solid #dbe6df;background:#fff;border-radius:17px;margin:4px 0 18px;padding:17px 19px}
.home-notice-header{display:flex;align-items:start;justify-content:space-between;gap:15px;flex-wrap:wrap}
.home-notice-header h3{font-size:15px;line-height:1.3;color:#254938;margin:0;font-weight:730}
.home-notice-header h3 span{display:inline-block;margin-left:5px;border-radius:99px;padding:2px 7px;background:#f5edda;color:#826029;font-size:12px}
.home-notice-header p{color:#6b7e72;font-size:11px;line-height:1.5;margin:0;max-width:380px}
.home-notice-list{margin-top:10px;display:grid;gap:7px}
.home-notice-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #ecede5;background:#fbfaf4;border-radius:12px;padding:11px 13px}
.home-notice-text{min-width:0}.home-notice-text strong{display:block;color:#52613b;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.home-notice-text p{color:#697b6c;font-size:11px;line-height:1.5;margin:3px 0 0}
.home-notice-item button{min-width:65px;min-height:44px;padding:7px 11px;border:1px solid #cddfce;border-radius:10px;background:#fff;color:#2e6745;font-weight:750;font-size:11px}
.home-command-notice{background:#fff5e9;border-color:#eed8b9}
.home-command-notice .home-notice-text strong{color:#745328}
@media(max-width:600px){.home-notice-center{padding:14px}.home-notice-item{gap:9px}.home-notice-header p{max-width:100%}}
:root[data-theme=dark] .home-notice-center{background:#1c1f25;border-color:#4a4a4a}
:root[data-theme=dark] .home-notice-header h3{color:#ebebeb}
:root[data-theme=dark] .home-notice-header p{color:#bebebe}
:root[data-theme=dark] .home-notice-item{background:#313131;border-color:#4c4c4c}
:root[data-theme=dark] .home-notice-text strong{color:#d9d9d9}
:root[data-theme=dark] .home-notice-text p{color:#c4c4c4}
:root[data-theme=dark] .home-command-notice{background:#363636;border-color:#4c4c4c}
:root[data-theme=dark] .home-command-notice .home-notice-text strong{color:#cccccc}
:root[data-theme=dark] .home-notice-item button{background:#434343;border-color:#6a6a6a;color:#eaeaea}

/* Real Android dark login contrast QA: ensure credentials and links remain readable. */
:root[data-theme=dark] .auth-panel .field-stack label,
:root[data-theme=dark] .auth-panel .auth-note,
:root[data-theme=dark] .auth-panel .auth-note a,
:root[data-theme=dark] .auth-panel .field-stack input,
:root[data-theme=dark] .logo,
:root[data-theme=dark] .logo small{color:#e1e1e1!important}
:root[data-theme=dark] .auth-panel .field-stack input::placeholder{color:#b4b4b4;opacity:1}
:root[data-theme=dark] .auth-panel .field-stack input:focus{outline:3px solid #9d9d9d;outline-offset:2px}
:root[data-theme=dark] .auth-panel>p{color:#c1c1c1!important}
:root[data-theme=dark] .auth-panel .auth-note a{text-decoration:underline;text-underline-offset:3px}

/* SmartHome V3.4: monochrome charcoal dark mode — black/grey, not green. */
:root[data-theme=dark]{
 --ink:#f2f3f6;--green:#cdd0d8;--leaf:#bfc3cd;--muted:#b6bac4;
 --line:#363941;--page:#0b0c0f;--white:#1c1f25;
 background:#0b0c0f;color:#f2f3f6;
}
:root[data-theme=dark] body,
:root[data-theme=dark] .workspace-main{background:#0b0c0f!important;color:#f1f2f5!important}
:root[data-theme=dark] .site-header,
:root[data-theme=dark] .sidebar{background:#15171c!important;color:#eff1f4!important;border-color:#373941!important}
:root[data-theme=dark] .panel,
:root[data-theme=dark] .metric:not(.featured),
:root[data-theme=dark] .home-device-empty,
:root[data-theme=dark] .auth-panel,
:root[data-theme=dark] .item,
:root[data-theme=dark] .home-device-card,
:root[data-theme=dark] .real-hardware-card{background:#1c1f25!important;border-color:#393d46!important;color:#e8eaee!important}
:root[data-theme=dark] .customer-experience .home-device-panel,
:root[data-theme=dark] .customer-experience #controls-panel{background:transparent!important;border:0!important}
:root[data-theme=dark] .customer-experience .home-device-card,
:root[data-theme=dark] .customer-experience .real-hardware-card{background:#1d2026!important;border-color:#3e424a!important}
:root[data-theme=dark] .customer-experience .climate-control-card{background:linear-gradient(165deg,#22252b,#2c2e35)!important}
:root[data-theme=dark] .site-header .logo-mark{background:#3a3d47!important;color:#f2f3f6!important}
:root[data-theme=dark] .logo,:root[data-theme=dark] .logo strong{color:#f1f3f6!important}
:root[data-theme=dark] .logo small{color:#c2c6ce!important}
:root[data-theme=dark] .hero-panel{background:radial-gradient(circle at 75% 16%,#3b3e47,#17191e 75%)!important;color:#f2f3f6!important}
:root[data-theme=dark] .hero-panel h2,
:root[data-theme=dark] .hero-panel>p,
:root[data-theme=dark] .hero-panel .light{color:#e0e3eb!important}
:root[data-theme=dark] .mock-preview{background:#262931!important;color:#eef0f4!important;box-shadow:0 20px 48px #0007}
:root[data-theme=dark] .mock-preview strong,
:root[data-theme=dark] .mock-preview span{color:#f0f2f5!important}
:root[data-theme=dark] .mock-grid>div{background:#343841!important;color:#ebedf2!important}
:root[data-theme=dark] .mock-grid small,
:root[data-theme=dark] .mock-head{color:#c3c6cf!important}
:root[data-theme=dark] .eyebrow,
:root[data-theme=dark] .auth-panel h1 em,
:root[data-theme=dark] .page-intro h1 em{color:#c1c5cf!important}
:root[data-theme=dark] .status-pill,
:root[data-theme=dark] .preview-tag,
:root[data-theme=dark] .gateway-chip{background:#31343d!important;border-color:#565b67!important;color:#e6e8ed!important}
:root[data-theme=dark] .workspace-layout .sidebar nav button.active{background:#393c47!important;color:#fff!important;box-shadow:inset 3px 0 #b4b8c3!important}
:root[data-theme=dark] .workspace-layout .sidebar nav button:hover,
:root[data-theme=dark] .workspace-layout .sidebar nav button:focus-visible{background:#30343d!important;color:#fff!important}
:root[data-theme=dark] .metric.featured{background:linear-gradient(135deg,#343842,#535865)!important;border-color:#626775!important;color:#fff!important}
:root[data-theme=dark] .metric strong{color:#eff1f5!important}
:root[data-theme=dark] .device-glyph,
:root[data-theme=dark] .device-freshness.real-health-recent,
:root[data-theme=dark] .device-freshness.real-health-stale{background:#333740!important;color:#e0e3e9!important}
:root[data-theme=dark] .device-alert .device-glyph,
:root[data-theme=dark] .device-freshness.real-health-offline{background:#42393e!important;color:#f1ced0!important}
:root[data-theme=dark] .climate-control-card .device-glyph{background:#40444e!important;color:#f3f4f7!important}
:root[data-theme=dark] .customer-experience .climate-control-card .device-primary-reading{background:#292c33!important;border-color:#4c505b!important;border-top-color:#9296a1!important;border-left-color:#777c88!important;box-shadow:inset 0 0 0 5px #292c33!important}
:root[data-theme=dark] .device-target-chip,
:root[data-theme=dark] .device-secondary-readings .device-target-chip{background:#353a44!important;color:#ebedf2!important;border-color:#5c606b!important}
:root[data-theme=dark] .device-reading-label,
:root[data-theme=dark] .device-reading-unit,
:root[data-theme=dark] .device-reading-age{color:#c5c9d2!important}
:root[data-theme=dark] .primary-button{background:#4a4f5c!important;color:#fff!important}
:root[data-theme=dark] .primary-button:hover:not(:disabled){background:#606674!important}
:root[data-theme=dark] .secondary-button{background:#373c46!important;border-color:#636875!important;color:#eef0f4!important}
:root[data-theme=dark] .secondary-button:hover:not(:disabled){background:#4c515f!important}
:root[data-theme=dark] .theme-toggle,
:root[data-theme=dark] .temperature-step,
:root[data-theme=dark] .device-settings-button{background:#383d47!important;color:#f1f3f6!important;border-color:#707581!important}
:root[data-theme=dark] .theme-toggle:hover,
:root[data-theme=dark] .temperature-step:hover:not(:disabled){background:#4d5361!important}
:root[data-theme=dark] .notice strong,
:root[data-theme=dark] .notice-icon{color:#e9ebef!important}
:root[data-theme=dark] .quick-connect-symbol,
:root[data-theme=dark] .onboarding-icon{background:#343842!important;color:#e7eaf1!important}
:root[data-theme=dark] .quick-help summary,
:root[data-theme=dark] .auth-panel .auth-note a,
:root[data-theme=dark] .subtle-button,
:root[data-theme=dark] .text-button{color:#e1e4ec!important}
:root[data-theme=dark] .home-notice-center{background:#1d2026!important;border-color:#424651!important}
:root[data-theme=dark] .home-notice-item{background:#2a2d34!important;border-color:#494d56!important}
:root[data-theme=dark] .home-notice-item button{background:#353a45!important;border-color:#686d78!important;color:#eff1f4!important}
:root[data-theme=dark] .home-command-notice{background:#353139!important;border-color:#645963!important}
:root[data-theme=dark] .home-attention-link,
:root[data-theme=dark] .device-reading-caution,
:root[data-theme=dark] .management-available-status.has-unsupported{background:#343139!important;border-color:#615761!important;color:#ecd1c9!important}
:root[data-theme=dark] .device-management-dialog .management-refresh-button,
:root[data-theme=dark] .management-hub-status{background:#2f333b!important;border-color:#565b66!important;color:#eaecf1!important}
:root[data-theme=dark] .physical-control-form .temperature-apply{background:#565c69!important;color:#fff!important}
:root[data-theme=dark] .power-action.is-reported{background:#454a56!important;border-color:#7d8390!important}
:root[data-theme=dark] button:focus-visible,
:root[data-theme=dark] input:focus-visible,
:root[data-theme=dark] select:focus-visible,
:root[data-theme=dark] a:focus-visible{outline:3px solid #c6cad4!important;outline-offset:2px}
:root[data-theme=dark] .auth-panel .field-stack input:focus{outline:3px solid #c6cad4!important}

/* V3.4 gateway steps and footer — remove remaining green accents in dark mode. */
:root[data-theme=dark] .setup-progress span,
:root[data-theme=dark] .setup-progress span.complete{
  background:#30343d!important;color:#e5e7ed!important;border-color:#535965!important
}
:root[data-theme=dark] .setup-progress span.current{
  background:#555b68!important;color:#fff!important;border-color:#8b919d!important
}
:root[data-theme=dark] .workspace-more:has([aria-current="page"]) > summary{
  background:#343842!important;color:#f0f2f5!important
}
:root[data-theme=dark] .gateway-status,
:root[data-theme=dark] .gateway-status.connected,
:root[data-theme=dark] .onboarding-hint,
:root[data-theme=dark] .quick-connect-caution,
:root[data-theme=dark] .quick-advanced{
  background:#292c34!important;border-color:#484d57!important;color:#dce0e8!important
}
:root[data-theme=dark] .sidebar-note .green-dot,
:root[data-theme=dark] .green-dot{background:#b6bbc6!important}
:root[data-theme=dark] footer,
:root[data-theme=dark] footer *{color:#acb1bc!important}
:root[data-theme=dark] .quick-connect-heading strong,
:root[data-theme=dark] #setup-stage-title{color:#e5e8ed!important}

/* V3.4 customer pages contrast audit: neutral secondary tiles and readable text. */
:root[data-theme=dark] #controls-panel #manage-add-device{
  background:#4a4f5b!important;border-color:#666c78!important;color:#fff!important
}
:root[data-theme=dark] .device-status-shortcuts button,
:root[data-theme=dark] .device-status-shortcuts button:disabled{
  background:#2b2e36!important;border:1px solid #474b56!important;
  color:#d3d7df!important;opacity:1!important
}
:root[data-theme=dark] .device-status-shortcuts button strong{color:#f0f2f5!important}
:root[data-theme=dark] .device-status-shortcuts button[aria-pressed=true]{
  background:#3b3f49!important;border-color:#9da2ae!important;
  box-shadow:inset 0 0 0 1px #777c89!important
}
:root[data-theme=dark] .device-status-shortcuts [data-report-filter=attention] strong{color:#e4d1c7!important}
:root[data-theme=dark] .real-device-filter-row label,
:root[data-theme=dark] .activity-toolbar label{color:#bfc4cf!important}
:root[data-theme=dark] .quick-linked,
:root[data-theme=dark] .quick-connect-live,
:root[data-theme=dark] .quick-next-step,
:root[data-theme=dark] .onboarding-hint{
  background:#282b33!important;border-color:#484d57!important;color:#e2e5eb!important
}
:root[data-theme=dark] .quick-linked-icon{background:#535966!important;color:#f7f8fa!important}
:root[data-theme=dark] .quick-linked-body strong,
:root[data-theme=dark] .quick-linked-body p,
:root[data-theme=dark] .quick-connect-live strong,
:root[data-theme=dark] .quick-connect-live p,
:root[data-theme=dark] .onboarding-hint p,
:root[data-theme=dark] .onboarding-hint strong,
:root[data-theme=dark] .quick-advanced summary{
  color:#dce0e8!important
}
:root[data-theme=dark] .quick-linked-body p,
:root[data-theme=dark] .onboarding-hint p{color:#bfc4cf!important}
:root[data-theme=dark] .quick-connect-checks span{
  background:#323640!important;border-color:#505560!important;color:#d9dde5!important
}
:root[data-theme=dark] .quick-connect-checks strong{color:#eef0f5!important}
:root[data-theme=dark] .hardware-preview-planner>p,
:root[data-theme=dark] .preview-planner-controls label,
:root[data-theme=dark] .hardware-preview-planner h3,
:root[data-theme=dark] .real-hardware-meta,
:root[data-theme=dark] .real-hardware-reading,
:root[data-theme=dark] .real-hardware-footnote,
:root[data-theme=dark] .real-device-category,
:root[data-theme=dark] .real-device-model,
:root[data-theme=dark] .real-device-health,
:root[data-theme=dark] .device-detail summary,
:root[data-theme=dark] .device-detail p,
:root[data-theme=dark] .device-detail small,
:root[data-theme=dark] .device-detail strong{color:#c9cdd6!important}
:root[data-theme=dark] .device-detail,
:root[data-theme=dark] .device-inspect{background:#292c34!important;border-color:#454953!important}
:root[data-theme=dark] .real-device-category,
:root[data-theme=dark] .real-device-model,
:root[data-theme=dark] .real-device-health{background:#323640!important;border-color:#515660!important}
:root[data-theme=dark] .preview-planner-controls select,
:root[data-theme=dark] .preview-planner-controls input{
  background:#262932!important;color:#ebedf2!important;border-color:#5a606b!important
}
:root[data-theme=dark] .preview-plan-line,
:root[data-theme=dark] .preview-plan-line:first-child{color:#d6d9e1!important}
:root[data-theme=dark] .real-hardware-list{background:#1c1e25!important;border-color:#3d414a!important}

/* V3.4 Android PWA install button: do not leave pale-green light-mode styling. */
:root[data-theme=dark] #install-app{
  background:#363a44!important;color:#f2f3f6!important;
  border:1px solid #69707d!important;box-shadow:none!important
}
:root[data-theme=dark] #install-app:hover:not(:disabled){
  background:#4a505e!important;color:#fff!important
}

/* V5: privacy-preserving Zigbee compatibility help for the installer. */
.management-support-guide{min-width:0;border:1px solid #e5d6b8;border-radius:16px;padding:14px 16px;background:#fffaf0;color:#594729}
.management-support-guide summary{min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:750;cursor:pointer}
.management-support-guide p{font-size:12px;line-height:1.55;color:#745f3e}
.management-support-report{display:block;box-sizing:border-box;width:100%;min-height:122px;resize:vertical;padding:12px;border:1px solid #d6cfbf;border-radius:12px;background:#fff;color:#353b35;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.management-support-guide .management-refresh-button{margin-top:12px;margin-bottom:0}
@media(max-width:600px){.management-support-guide{padding:11px}.management-support-guide .management-refresh-button{width:100%}}
:root[data-theme=dark] .management-support-guide{background:#302d30!important;border-color:#69616a!important;color:#f0e7db!important}
:root[data-theme=dark] .management-support-guide summary{color:#f2e8e0!important}
:root[data-theme=dark] .management-support-guide p{color:#d7ccc3!important}
:root[data-theme=dark] .management-support-report{background:#23262e!important;border-color:#585d67!important;color:#f0f1f4!important}

/* V6: distinguish observed feedback from ambiguous hub acknowledgements. */
.thermostat-adjustment.target-unverified{border-color:#e6d0b3;background:#fff9ec}
.thermostat-adjustment.target-unverified .temperature-help{display:block;color:#805a2a;font-weight:700;line-height:1.55}
.physical-command-status[data-outcome=confirmed],
.physical-command-status[data-outcome=unknown],
.physical-command-status[data-outcome=failed],
.physical-command-status[data-outcome=expired]{color:#94542b;font-weight:700}
.physical-command-status[data-outcome=observed]{color:#27704a;font-weight:700}
:root[data-theme=dark] .thermostat-adjustment.target-unverified{background:#322e2b!important;border-color:#736456!important}
:root[data-theme=dark] .thermostat-adjustment.target-unverified .temperature-help{color:#ead3b4!important}
:root[data-theme=dark] .physical-command-status[data-outcome=confirmed],
:root[data-theme=dark] .physical-command-status[data-outcome=unknown],
:root[data-theme=dark] .physical-command-status[data-outcome=failed],
:root[data-theme=dark] .physical-command-status[data-outcome=expired]{color:#efc39f!important}
:root[data-theme=dark] .physical-command-status[data-outcome=observed]{color:#e1e4eb!important}

/* V6: operator review packets are local draft notes, never executable scenes. */
.preview-review-panel{margin-top:16px;padding:14px 16px;border:1px solid #d9dfdd;border-radius:17px;background:#f7f9f8;color:#334942}
.preview-review-panel summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:750}
.preview-review-panel p{font-size:12px;line-height:1.55;color:#52635b}
.preview-review-panel textarea{display:block;width:100%;min-height:155px;box-sizing:border-box;resize:vertical;border:1px solid #cbd7d1;border-radius:12px;background:#fff;color:#2c4238;padding:12px;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.preview-review-panel button{margin-top:12px;min-height:44px;white-space:normal}
@media(max-width:600px){.preview-review-panel{padding:12px}.preview-review-panel button{width:100%}}
:root[data-theme=dark] .preview-review-panel{background:#292c34!important;border-color:#50545f!important;color:#eff0f4!important}
:root[data-theme=dark] .preview-review-panel summary{color:#e8eaf0!important}
:root[data-theme=dark] .preview-review-panel p{color:#c4c8d0!important}
:root[data-theme=dark] .preview-review-panel textarea{background:#23262c!important;color:#eef0f4!important;border-color:#5e6470!important}

/* V6 production device enrollment: pick one real candidate, never bulk add. */
.management-discovery-tools{display:grid;gap:10px;margin:12px 0 14px}
.management-device-search{box-sizing:border-box;width:100%;height:48px;min-width:0;padding:10px 14px;border:1px solid #ccdcd1;border-radius:13px;background:#fff;color:#233b2f;font:inherit;font-size:15px}
.management-device-search:focus-visible{outline:3px solid #87b99a;outline-offset:1px}
.management-device-filters{display:flex;gap:8px;flex-wrap:wrap}
.management-device-filters .management-filter-button{min-height:44px;flex:1 1 140px;border:1px solid #cbded1;border-radius:12px;padding:9px 11px;background:#f5faf6;color:#355c44;font:650 12px inherit;cursor:pointer}
.management-device-filters .management-filter-button[aria-pressed=true]{background:#e7f1e9;border-color:#75a98a;box-shadow:inset 0 0 0 1px #75a98a}
.management-devices-showing{font-size:12px!important;color:#576e5e!important;margin:0!important}
.management-device-code{font-variant-numeric:tabular-nums;letter-spacing:.025em}
.management-new-badge{display:inline-flex;align-items:center;background:#e9f4ec;color:#315f3c;font-size:11px;font-weight:750;margin-top:6px;padding:5px 9px;border-radius:9px}
.management-device-row>div:first-child{flex:1;min-width:0}
@media(max-width:600px){.management-device-filters .management-filter-button{flex:1 1 0;min-width:0;padding:9px 7px;font-size:11px}.management-device-search{height:48px}}
:root[data-theme=dark] .management-device-search{background:#242830!important;border-color:#5b6470!important;color:#f0f2f5!important}
:root[data-theme=dark] .management-device-filters .management-filter-button{background:#30343e!important;border-color:#5d6471!important;color:#e9ebf0!important}
:root[data-theme=dark] .management-device-filters .management-filter-button[aria-pressed=true]{background:#424751!important;border-color:#777d89!important;box-shadow:inset 0 0 0 1px #777d89!important}
:root[data-theme=dark] .management-new-badge{background:#424751!important;color:#e6eaf0!important}
:root[data-theme=dark] .management-devices-showing{color:#c0c6d0!important}

/* Production onboarding: real imports can be named and grouped without
   pairing again or enabling physical actuation. */
.device-setup-panel{display:grid;gap:11px;margin:12px 0 18px;padding:16px;border:1px solid #cadfce;border-radius:17px;background:#f7faf6;color:#294938;min-width:0}
.device-setup-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.device-setup-heading strong{font-size:15px;color:#274733}
.device-setup-heading small{font-size:12px;color:#5c735f;font-weight:650}
.device-setup-help{font-size:12px;line-height:1.55;color:#506757;margin:0}
.device-setup-rows{display:grid;gap:8px}
.device-setup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e2eae3;background:#fff;padding:9px 12px;border-radius:12px;min-width:0}
.device-setup-row span{font-size:13px;min-width:0;overflow-wrap:anywhere}
.device-setup-row button,.device-report-help button{min-height:44px;flex-shrink:0}
.device-report-help{display:grid;gap:7px;border-top:1px solid #dae5db;padding-top:12px}
.device-report-help strong{font-size:13px}
.device-report-help p{font-size:12px;line-height:1.55;margin:0;color:#627164}
.device-report-help button{justify-self:start}
@media(max-width:600px){.device-setup-panel{padding:12px}.device-setup-row{flex-wrap:wrap}.device-setup-row button,.device-report-help button{width:100%}}
:root[data-theme=dark] .device-setup-panel{background:#282b33!important;border-color:#565d68!important;color:#ebedf1!important}
:root[data-theme=dark] .device-setup-heading strong,
:root[data-theme=dark] .device-report-help strong{color:#f0f1f4!important}
:root[data-theme=dark] .device-setup-heading small,
:root[data-theme=dark] .device-setup-help,
:root[data-theme=dark] .device-report-help p{color:#c9cdd6!important}
:root[data-theme=dark] .device-setup-row{background:#252832!important;border-color:#505662!important}
:root[data-theme=dark] .device-report-help{border-color:#505662!important}

.device-setup-identity{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.device-setup-identity strong{font-size:13px;font-weight:700}
.device-setup-identity small{font-size:11px;color:#617363;font-variant-numeric:tabular-nums}
.real-device-code{font-size:11px;letter-spacing:.02em;font-variant-numeric:tabular-nums;opacity:.85}
:root[data-theme=dark] .device-setup-identity small{color:#c8cdd6!important}
:root[data-theme=dark] .real-device-code{color:#d4d9e1!important}

/* V6 mobile legibility: larger native-looking device and navigation icons.
   Preserve the underlying cards, provenance and touch interactions. */
.device-glyph{width:56px;height:56px;border-radius:17px}
.device-glyph svg{width:34px;height:36px;stroke-linecap:round;stroke-linejoin:round}
.device-face-top{grid-template-columns:56px minmax(0,1fr) auto;column-gap:14px;row-gap:6px}
.device-face-top .device-glyph{width:56px;height:56px;border-radius:17px}
.device-settings-button{width:48px;height:48px;min-height:48px;font-size:25px}
.workspace-layout .sidebar nav button span[aria-hidden]{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:27px;min-height:27px;font-size:23px;line-height:1
}
@media(max-width:820px){
  .workspace-layout .sidebar nav > button{
    min-height:65px;gap:6px;padding:9px 3px;font-size:11px
  }
  .workspace-layout .sidebar nav button span[aria-hidden]{
    font-size:24px;min-height:28px;min-width:28px
  }
  .workspace-layout .sidebar nav .workspace-more button span[aria-hidden]{
    font-size:22px
  }
}
@media(max-width:600px){
  .device-face-top{grid-template-columns:52px minmax(0,1fr);column-gap:10px;row-gap:5px}
  .device-face-top:has(.device-settings-button){grid-template-columns:52px minmax(0,1fr) 46px}
  .device-face-top .device-glyph{width:52px;height:52px;border-radius:16px}
  .device-glyph svg{width:32px;height:34px}
  .device-settings-button{width:46px;height:46px;min-height:46px;font-size:24px}
  .workspace-layout .sidebar nav > button{min-height:68px}
  .workspace-layout .sidebar nav button span[aria-hidden]{font-size:24px}
}
/* Explicit one-click admission for ALREADY connected Zigbee devices. */
.management-batch-button{display:block;box-sizing:border-box;width:100%;min-height:48px;
  margin:8px 0 11px;border-radius:12px;font-size:13px;font-weight:750}
.management-batch-button[hidden]{display:none}
:root[data-theme=dark] .management-batch-button{background:#404650!important;color:#f5f6f8!important;border-color:#78818d!important}
/* Display approved control layout when physical feedback is not yet valid;
   all inputs are disabled and no request handlers are attached. */
.physical-controls-locked{display:grid;gap:9px;opacity:.85}
.physical-controls-locked .physical-power-actions button:disabled,
.physical-controls-locked .temperature-step:disabled{
  opacity:.55;cursor:not-allowed;touch-action:none}
.physical-control-locked-status{font-size:12px;line-height:1.55;
  font-weight:650;color:#7c653c;margin:3px 0 0}
:root[data-theme=dark] .physical-control-locked-status{color:#d8c5ac!important}

/* Keep the active pairing action ahead of optional hub diagnostics. */
.device-management-dialog.pair-devices-dialog[open]{
  display:flex;flex-direction:column;height:auto;max-height:calc(100dvh - 24px);
  width:min(460px,calc(100vw - 24px));overflow:hidden
}
.pair-devices-dialog .management-dialog-header{flex:none}
.pair-devices-dialog .management-dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;gap:12px}
.pair-devices-dialog .management-pairing{
  display:grid;justify-items:start;gap:8px;min-width:0;padding:0;border:0;
  background:transparent!important
}
.pair-devices-dialog .management-hub-status{
  font-size:16px;font-weight:700;line-height:1.45;font-variant-numeric:tabular-nums;
  border:0;padding:0;margin:0;background:transparent!important;color:var(--ink)!important
}
.pair-devices-dialog p.pairing-instruction{margin:0;font-size:14px}
.pair-devices-dialog .management-pairing>button{margin:4px 0 0}
.pair-devices-dialog .management-found-devices,.pair-devices-dialog .management-joined-devices{width:100%}
.pair-devices-dialog .management-support-guide{
  padding:0;border:0;border-top:1px solid var(--line);border-radius:0;
  background:transparent!important;color:var(--muted)!important
}
.pair-devices-dialog .management-support-guide>summary{
  display:list-item;padding:12px 0 4px;min-height:44px;color:var(--muted)!important
}
.pair-devices-dialog .management-feedback:empty,.pair-devices-dialog .management-job-summary:empty{display:none}
.pair-devices-dialog .management-feedback{flex:none;max-height:92px;overflow-y:auto}
:root[data-theme=dark] .pair-devices-dialog .management-hub-status,
:root[data-theme=dark] .pair-devices-dialog .management-support-guide{background:transparent!important}
:root[data-theme=dark] .pair-devices-dialog .management-support-guide>summary{color:var(--muted)!important}
@media(max-width:600px){
  .pair-devices-dialog .management-pairing>button{width:100%}
}
.management-found-devices,.management-joined-devices{display:grid;gap:8px;padding-top:9px}
.management-found-devices[hidden],.management-joined-devices[hidden]{display:none}
.management-new-device-row{display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:10px 11px;border:1px solid #b9dfc4;border-radius:12px;background:#f4fcf5;min-width:0}
.management-new-device-row .device-setup-identity{flex:1;min-width:0;overflow-wrap:anywhere}
.management-new-device-row button{min-height:44px;flex-shrink:0}
.device-just-added{display:inline-flex;width:fit-content;margin-top:3px;border-radius:8px;
  padding:3px 7px;font-weight:700;font-size:11px;background:#d8f0df;color:#255c37}
:root[data-theme=dark] .management-new-device-row{background:#30353d!important;
  border-color:#66717c!important;color:#eef2f5!important}
:root[data-theme=dark] .device-just-added{background:#424e4a!important;color:#d8e9df!important}
@media(max-width:600px){.management-new-device-row{flex-wrap:wrap}
  .management-new-device-row button{width:100%}}

/* Home-scoped dashboard visibility, never a physical hub reset. */
.management-bulk-list{display:grid;gap:6px;max-height:245px;overflow:auto;margin:12px 0;padding:3px}
.management-bulk-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line,#dce5dd);border-radius:10px;min-height:44px;overflow-wrap:anywhere}
.management-bulk-item input{width:18px;height:18px;flex:0 0 18px;accent-color:#427c51}
.management-bulk-actions{display:flex;flex-wrap:wrap;gap:8px}
.device-setup-more>summary{cursor:pointer;font-size:13px;font-weight:650;padding:9px 0}
.device-setup-more .device-setup-rows{margin-top:4px}
:root[data-theme=dark] .management-bulk-item{border-color:#505662;color:#ebedf1}

/* Quiet is a neutral contact classification, never an online or safety indicator. */
.real-health-quiet{background:#eef1f3;color:#52616a}
.device-freshness.real-health-quiet::before{background:#89959b}
:root[data-theme=dark] .real-health-quiet{background:#333740!important;color:#d2d7dc!important}

/* The same target editor lives inside the visible Home or Devices card. */
.thermostat-face{
  --dial-size:min(196px,100cqi);--dial-track:#dce5e9;--dial-accent:#14779c;
  --dial-knob:#fff;--dial-ink:#193540;--dial-muted:#53666e;--dial-rule:#e0e8e9;
  --dial-button:#eef4f6;
}
@media(min-width:600px){
  .home-device-card:only-child:has(>.thermostat-face),.real-hardware-card:only-child:has(>.thermostat-face){
    width:100%;max-width:460px;justify-self:start;
  }
}
.thermostat-face .device-face-top{grid-template-columns:auto minmax(0,1fr) auto}
.thermostat-face .thermostat-details{
  grid-column:3;grid-row:1 / span 2;align-self:start;width:44px;height:44px;min-height:44px;
  padding:0;display:grid;place-items:center;margin:0;background:transparent;border:0;
  border-radius:50%;font-size:25px;line-height:1;letter-spacing:1px;color:var(--dial-muted);
}
.thermostat-face .thermostat-details:hover{background:var(--dial-button)}
.climate-control-slot{container-type:inline-size;width:100%;margin:14px 0 12px}
.climate-control-slot:has(>.thermostat-control-form)>.thermostat-passive-dial{display:none}
.thermostat-face .thermostat-control-form{display:block;margin:0;padding:0;border:0;opacity:1}
.thermostat-face .thermostat-adjustment,.thermostat-face .thermostat-passive-dial{
  position:relative;isolation:isolate;box-sizing:border-box;margin:0 auto;min-width:0;
  padding:0;width:100%;border:0;background:transparent!important;border-radius:0;
}
.thermostat-face .thermostat-adjustment::before,.thermostat-face .thermostat-passive-dial::before{
  content:"";position:absolute;left:50%;top:0;transform:translateX(-50%);
  width:var(--dial-size);aspect-ratio:1;border-radius:50%;pointer-events:none;
  background:conic-gradient(from 225deg,var(--dial-accent) 0 calc(var(--thermostat-level,0)*270deg),
    var(--dial-track) 0 270deg,transparent 0);
  mask:radial-gradient(farthest-side,transparent calc(100% - 10px),#000 calc(100% - 9px));
}
.thermostat-face .thermostat-adjustment[style*="--thermostat-level"]::after{
  content:"";position:absolute;z-index:2;pointer-events:none;top:calc(var(--dial-size)/2);left:50%;
  width:18px;height:18px;box-sizing:border-box;background:var(--dial-knob);border:4px solid var(--dial-accent);
  border-radius:50%;box-shadow:0 1px 4px #16384d33;
  transform:translate(-50%,-50%) rotate(calc(-135deg + var(--thermostat-level)*270deg)) translateY(calc(5px - var(--dial-size)/2));
}
.thermostat-face .thermostat-dial-input{
  position:absolute;top:0;left:50%;transform:translateX(-50%);width:var(--dial-size);
  height:var(--dial-size);border:0;border-radius:50%;z-index:1;touch-action:none;cursor:pointer;
}
.thermostat-face .thermostat-dial-input:focus-visible{outline:3px solid var(--dial-accent);outline-offset:3px}
.thermostat-face .thermostat-caption,.thermostat-face .thermostat-adjustment>.temperature-help,
.thermostat-face .dial-caption{
  position:absolute;top:calc(var(--dial-size)*.29);left:0;right:0;display:block;text-align:center;
  margin:0;padding:0 5px;color:var(--dial-muted);font-size:12px;line-height:1.3;font-weight:550;pointer-events:none;
}
.thermostat-face .temperature-stepper{
  position:relative;box-sizing:border-box;width:100%;min-width:0;height:calc(var(--dial-size) + 6px);
  display:flex;align-items:flex-end;justify-content:center;gap:12px;pointer-events:none;
}
.thermostat-face .temperature-step,.thermostat-face .thermostat-adjustment .temperature-step{
  position:relative;z-index:3;pointer-events:auto;display:grid;place-items:center;margin:0;padding:0;
  width:46px;height:46px;min-width:46px;min-height:46px;border:1px solid var(--dial-rule);
  border-radius:50%;background:var(--dial-button);color:var(--dial-ink);font-size:27px;line-height:1;
}
.thermostat-face .temperature-step:disabled{opacity:.43}
.thermostat-face .temperature-target,.thermostat-face .thermostat-reported-target{
  position:absolute;left:0;right:0;top:calc(var(--dial-size)*.385);margin:0;pointer-events:none;
  color:var(--dial-ink);text-align:center;font-size:43px;line-height:1.15;font-weight:600;
  letter-spacing:-.07em;font-variant-numeric:tabular-nums;
}
.thermostat-face .temperature-target.is-draft{color:var(--dial-accent)}
.thermostat-face .thermostat-passive-dial{height:calc(var(--dial-size)*.89)}
.thermostat-face .thermostat-target-age{
  position:absolute;top:calc(var(--dial-size)*.68);left:0;right:0;text-align:center;
  color:var(--dial-muted);font-size:11px;font-weight:450;
}
.thermostat-face .temperature-draft-actions{margin:12px auto 0;max-width:280px}
.thermostat-face .physical-control-locked-status,.thermostat-face .physical-command-status{
  margin:8px 0 0;text-align:center;color:var(--dial-muted);
}
.thermostat-room{
  display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--dial-rule);
  padding:13px 0 0;text-align:left;
}
.thermostat-face .thermostat-room .device-reading-label{margin:0;color:var(--dial-muted);font-size:12px;text-align:left}
.customer-experience .thermostat-room .device-primary-reading,
#controls-panel .thermostat-room .device-primary-reading{
  display:inline-flex;flex:none;align-items:baseline;justify-content:end;width:auto;height:auto;min-height:0;
  margin:0;padding:0;gap:2px;border:0;border-radius:0;background:none;box-shadow:none;
}
.customer-experience .thermostat-face .thermostat-room .device-primary-reading strong{
  font-size:19px;font-weight:600;line-height:1.3;letter-spacing:-.04em;color:var(--dial-ink);
}
.thermostat-face .thermostat-room .device-reading-unit{font-size:13px;color:var(--dial-muted)}
.thermostat-face .device-secondary-readings{justify-content:start;margin:7px 0 0}
:root[data-theme=dark] .thermostat-face{
  --dial-track:#515b65;--dial-accent:#76c5e5;--dial-knob:#28343b;--dial-ink:#eef5f7;
  --dial-muted:#c3cbd2;--dial-rule:#474e56;--dial-button:#39414b;
}
:root[data-theme=dark] .thermostat-face .thermostat-adjustment,
:root[data-theme=dark] .customer-experience .thermostat-face .thermostat-room .device-primary-reading{
  border:0!important;background:transparent!important;box-shadow:none!important;
}

/* Heating configuration uses the existing dashboard palette and touch targets. */
.heating-zone-card{border:1px solid var(--border,#dbe5dd);border-radius:16px;padding:16px;min-width:0}
.heating-zone-card h3{margin:0;overflow-wrap:anywhere}
.heating-zone-card p{margin:10px 0 5px}
.heating-zone-card small{color:inherit;opacity:.8}
.heating-zone-values,.heating-number-fields,.heating-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.heating-zone-values{margin-top:12px;font-size:1rem;font-weight:600}
.heating-number-fields>label{flex:1 1 120px;min-width:0}
.heating-actions h3{margin-right:auto}
.heating-actions button{min-height:44px}
.heating-form{margin-top:20px;max-width:620px}
.heating-form select,.heating-form input{min-width:0;width:100%}

.workflow-section{min-width:0;padding:16px 0;border-top:1px solid var(--border,#dbe5dd);margin-top:12px}
.workflow-section .panel-heading{gap:12px;flex-wrap:wrap}
.workflow-section .panel-heading h3{margin:0 0 6px}
.workflow-section .panel-heading button{min-height:44px}
#workflow-custom-editor{margin-top:16px;max-width:620px}
#automation-panel{min-width:0}
