/* Home Key — Home Portrait styles.
 * Ported from the approved home.html (PR #1284) and scoped under .hk-home so the
 * portrait can live inside index.html without its class names (.rail, .stage,
 * .card) colliding with the portal's existing styles. Loaded as a direct <link>
 * so the composition renders before any module runs. Source of truth for the
 * composition remains home.html, kept as the visual-regression fixture.
 */
@font-face{font-family:'DM Sans';src:url('./assets/home/fonts/dm-sans-latin.woff2') format('woff2');font-weight:100 1000;font-style:normal;font-display:swap}
@font-face{font-family:'Newsreader';src:url('./assets/home/fonts/newsreader-latin.woff2') format('woff2');font-weight:200 800;font-style:normal;font-display:swap}
.hk-home{
  --bg:#0a1017;--bg2:#0d141d;--panel:#101923;--panel2:#131d28;
  --glass:rgba(10,16,24,.66);--glass2:rgba(12,19,27,.82);
  --line:rgba(255,255,255,.09);--line2:rgba(255,255,255,.14);
  --ink:#f2f6f9;--soft:#c0ccd6;--muted:#8fa0af;
  --accent:#ec6a1f;--accent-2:#ff8a3d;--good:#7edda5;--good-deep:#3f8f63;
  --watch:#ffbd5c;--plan:#8ec2ff;
  --serif:'Newsreader',Georgia,'Times New Roman',serif;
  --sans:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --rail-w:316px;--nav-w:192px;
  --r-lg:20px;--r-md:14px;--r-sm:10px;
  --shadow:0 18px 50px rgba(0,0,0,.45);
}
.hk-home[hidden]{display:none!important}
.hk-home *{box-sizing:border-box}
.hk-home, .hk-home{margin:0;height:100%}
.hk-home{background:var(--bg);color:var(--ink);font:400 15px/1.45 var(--sans);-webkit-font-smoothing:antialiased;overflow-x:hidden}
.hk-home button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
.hk-home button:focus-visible, .hk-home input:focus-visible, .hk-home a:focus-visible, .hk-home [tabindex]:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px;border-radius:8px}
.hk-home img{display:block;max-width:100%}
.hk-home .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hk-home .icon{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hk-home .app{display:grid;grid-template-columns:var(--nav-w) minmax(0,1fr);min-height:100vh}
.hk-home .nav{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:4px;
  padding:22px 14px 18px;background:linear-gradient(180deg,#0b1119,#0a0f16);border-right:1px solid var(--line);z-index:40}
.hk-home .brand{display:flex;gap:11px;align-items:center;padding:2px 6px 24px}
.hk-home .brand svg{width:34px;height:34px;stroke:#e9eef3;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.hk-home .brand b{font:600 21px/1.04 var(--serif);letter-spacing:.01em}
.hk-home .nav-item{display:flex;gap:12px;align-items:center;padding:12px 12px;border-radius:12px;color:#aab7c2;font-weight:600;font-size:14.5px;position:relative;transition:background .15s,color .15s}
.hk-home .nav-item:hover{background:rgba(255,255,255,.05);color:#e6edf2}
.hk-home .nav-item[aria-current="page"]{background:linear-gradient(90deg,rgba(236,106,31,.16),rgba(236,106,31,.05));color:#f4d9c8;border:1px solid rgba(236,106,31,.35)}
.hk-home .nav-item[aria-current="page"]::before{content:"";position:absolute;left:-1px;top:9px;bottom:9px;width:3px;border-radius:3px;background:var(--accent)}
.hk-home .nav-item[aria-current="page"] .icon{color:var(--accent-2)}
.hk-home .nav-spacer{flex:1}
.hk-home .ask-nav{display:flex;gap:12px;align-items:center;padding:12px;border-radius:12px;color:#aab7c2;font-weight:600;font-size:14.5px}
.hk-home .ask-nav:hover{background:rgba(255,255,255,.05);color:#e6edf2}
.hk-home .profile{display:flex;gap:10px;align-items:center;margin-top:10px;padding:10px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.03)}
.hk-home .avatar{width:36px;height:36px;border-radius:50%;flex:none;display:grid;place-items:center;font:700 13px var(--sans);color:#20130b;background:radial-gradient(circle at 30% 30%,#ffc79b,#e8946a)}
.hk-home .profile b{display:block;font-size:13.5px}
.hk-home .profile small{color:var(--muted);font-size:11.5px}
.hk-home .profile .icon{margin-left:auto;width:15px;height:15px;color:var(--muted)}
.hk-home .main{display:flex;flex-direction:column;min-width:0;min-height:100vh}
.hk-home .view{display:none}
.hk-home .view.active{display:flex;flex-direction:column;flex:1}
.hk-home .stage-wrap{position:relative;flex:1;display:flex;flex-direction:column;min-height:520px}
.hk-home .stage{position:relative;flex:1;min-height:520px;overflow:hidden;background:#0c141c}
.hk-home .hero{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 42%;
  transition:transform .8s cubic-bezier(.3,.7,.25,1),filter .5s ease;transform-origin:52% 30%}
.hk-home .stage::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(7,11,17,.62) 0%,rgba(7,11,17,.18) 26%,rgba(7,11,17,0) 45%,rgba(7,11,17,.14) 74%,rgba(7,11,17,.66) 100%)}
.hk-home .stage::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(7,11,17,.5),rgba(7,11,17,0) 30%)}
.hk-home .stage.is-day .hero{filter:brightness(1.32) saturate(1.12) contrast(.97)}
.hk-home .stage.is-roof .hero{transform:scale(1.75) translateY(16%)}
.hk-home .stage.is-cutaway .hero{filter:brightness(.3) saturate(.5) blur(1px)}
.hk-home .cutaway-layer{position:absolute;inset:0;z-index:2;display:none;place-items:center;pointer-events:none;padding:40px}
.hk-home .stage.is-cutaway .cutaway-layer{display:grid}
.hk-home .cutaway-layer svg{width:min(680px,72%);height:auto;filter:drop-shadow(0 0 24px rgba(120,190,255,.25))}
.hk-home .cutaway-note{position:absolute;left:50%;transform:translateX(-50%);bottom:96px;z-index:3;
  background:var(--glass2);border:1px solid var(--line2);border-radius:999px;padding:7px 16px;
  color:var(--soft);font-size:12.5px;backdrop-filter:blur(12px);display:none}
.hk-home .stage.is-cutaway .cutaway-note{display:block}
.hk-home .glass{background:var(--glass);border:1px solid var(--line);border-radius:var(--r-lg);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.hk-home .stage-top{position:absolute;z-index:5;top:26px;left:30px;right:calc(var(--rail-w) + 44px);display:flex;justify-content:space-between;align-items:flex-start;gap:18px;pointer-events:none}
.hk-home .address h1{margin:0;font:500 clamp(26px,2.6vw,37px)/1.05 var(--serif);letter-spacing:.005em;text-shadow:0 2px 18px rgba(0,0,0,.55)}
.hk-home .address p{margin:6px 0 0;color:#dbe4ea;font-size:15px;text-shadow:0 1px 10px rgba(0,0,0,.6)}
.hk-home .condition{pointer-events:auto;margin-top:16px;width:min(430px,100%);padding:16px 16px 14px;border-radius:var(--r-lg);box-shadow:var(--shadow)}
.hk-home .condition-head{display:flex;align-items:center;gap:10px}
.hk-home .check{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--good-deep)}
.hk-home .check .icon{width:14px;height:14px;stroke-width:2.4;color:#eafff3}
.hk-home .condition-head b{font-size:16.5px;font-weight:700}
.hk-home .info-btn{margin-left:auto;width:22px;height:22px;border-radius:50%;border:1.4px solid var(--muted);color:var(--muted);display:grid;place-items:center;font:600 12px var(--sans)}
.hk-home .info-btn:hover{color:var(--soft);border-color:var(--soft)}
.hk-home .condition>p{margin:9px 0 12px;color:var(--soft);font-size:13.5px}
.hk-home .cta{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;
  background:linear-gradient(180deg,#f1782c,#e05f14);border-radius:12px;padding:12px 16px;
  font-weight:700;font-size:14.5px;color:#fff;box-shadow:0 8px 22px rgba(224,95,20,.35);transition:transform .15s,box-shadow .15s}
.hk-home .cta:hover{transform:translateY(-1px);box-shadow:0 11px 26px rgba(224,95,20,.42)}
.hk-home .cta .icon{width:17px;height:17px;stroke-width:2.2}
.hk-home .weather{pointer-events:auto;display:flex;gap:11px;align-items:center;padding:10px 15px 10px 10px;border-radius:16px}
.hk-home .weather-ico{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:rgba(255,187,92,.14);color:#ffca7a}
.hk-home .weather b{display:block;font-size:16px}
.hk-home .weather small{color:var(--muted);font-size:11.5px}
.hk-home .marker{position:absolute;z-index:4;transform:translate(-50%,-50%);display:flex;align-items:center;gap:9px;
  padding:8px 14px 8px 8px;border-radius:999px;background:var(--glass2);border:1px solid var(--line2);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 10px 26px rgba(0,0,0,.4);
  transition:opacity .3s,transform .3s,border-color .2s;white-space:nowrap}
.hk-home .marker:hover{border-color:rgba(255,255,255,.28);transform:translate(-50%,-50%) scale(1.04)}
.hk-home .marker-ico{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.09);color:#dfe8ef}
.hk-home .marker-ico .icon{width:16px;height:16px}
.hk-home .marker b{display:block;font-size:13.5px;line-height:1.15;text-align:left}
.hk-home .marker small{display:block;font-size:11.5px;line-height:1.2;text-align:left;font-weight:600}
.hk-home .marker[data-status="watch"] small{color:var(--watch)}
.hk-home .marker[data-status="watch"] .marker-ico{background:rgba(255,189,92,.16);color:var(--watch)}
.hk-home .marker[data-status="good"] small{color:var(--good)}
.hk-home .stage.attention .marker[data-status="good"]{opacity:.18;pointer-events:none}
.hk-home .stage.attention .marker[data-status="watch"]{border-color:rgba(255,189,92,.55)}
.hk-home .stage.is-roof .marker[data-status]{opacity:0;pointer-events:none}
.hk-home .stage.is-roof .marker[data-system="roof"]{opacity:1;pointer-events:auto}
.hk-home .stage.is-cutaway .marker[data-status]{opacity:0;pointer-events:none}
.hk-home .popover{position:absolute;z-index:8;width:296px;padding:15px;border-radius:var(--r-lg);box-shadow:var(--shadow);display:none}
.hk-home .popover.open{display:block}
.hk-home .popover h3{margin:0 0 2px;font-size:15.5px}
.hk-home .popover .status-line{font-size:12.5px;font-weight:700;margin-bottom:8px}
.hk-home .popover p{margin:0 0 10px;color:var(--soft);font-size:13px;line-height:1.5}
.hk-home .popover .meta{color:var(--muted);font-size:12px;margin-bottom:12px}
.hk-home .pop-actions{display:flex;gap:8px}
.hk-home .btn-ghost{border:1px solid var(--line2);border-radius:10px;padding:8px 13px;font-weight:650;font-size:13px;color:var(--soft);background:rgba(255,255,255,.04)}
.hk-home .btn-ghost:hover{background:rgba(255,255,255,.09);color:var(--ink)}
.hk-home .btn-solid{border-radius:10px;padding:8px 13px;font-weight:700;font-size:13px;color:#fff;background:linear-gradient(180deg,#f1782c,#e05f14)}
.hk-home .pop-close{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:var(--muted);background:rgba(255,255,255,.06)}
.hk-home .stage-controls{position:absolute;z-index:5;bottom:22px;left:30px;right:calc(var(--rail-w) + 44px);display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.hk-home .seg{display:flex;padding:5px;border-radius:14px;gap:2px}
.hk-home .seg button{display:flex;gap:8px;align-items:center;padding:9px 15px;border-radius:10px;font-weight:650;font-size:13.5px;color:#b9c5cf}
.hk-home .seg button:hover{color:var(--ink)}
.hk-home .seg button[aria-pressed="true"]{background:rgba(255,255,255,.12);color:var(--ink);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.hk-home .stage-tools{display:flex;gap:10px;align-items:center}
.hk-home .tool-group{display:flex;padding:5px;border-radius:14px;gap:2px}
.hk-home .tool-group button{width:38px;height:36px;display:grid;place-items:center;border-radius:10px;color:#b9c5cf}
.hk-home .tool-group button:hover{color:var(--ink);background:rgba(255,255,255,.07)}
.hk-home .tool-group button[aria-pressed="true"]{background:rgba(255,255,255,.12);color:var(--ink)}
.hk-home .reset-btn{display:flex;gap:8px;align-items:center;padding:9px 15px;border-radius:14px;font-weight:650;font-size:13.5px;color:#b9c5cf}
.hk-home .reset-btn:hover{color:var(--ink)}
.hk-home .provenance{position:absolute;z-index:5;left:30px;bottom:74px;display:none;max-width:430px;padding:10px 14px;border-radius:12px;color:var(--soft);font-size:12.5px}
.hk-home .provenance.open{display:block}
.hk-home .rail{position:absolute;z-index:6;top:20px;right:20px;bottom:20px;width:var(--rail-w);display:flex;flex-direction:column;gap:12px;overflow:auto;scrollbar-width:none}
.hk-home .rail::-webkit-scrollbar{display:none}
.hk-home .rail-card{padding:15px 16px;border-radius:var(--r-lg);background:rgba(11,17,25,.86);border:1px solid var(--line);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 14px 40px rgba(0,0,0,.38)}
.hk-home .rail-card h2{margin:0 0 11px;font-size:15.5px;font-weight:700;display:flex;align-items:center;justify-content:space-between}
.hk-home .rail-card h2 small{color:var(--muted);font-weight:600;font-size:11.5px}
.hk-home .record-body{display:grid;grid-template-columns:auto 1fr;gap:13px;align-items:center}
.hk-home .ring-wrap{position:relative;width:96px;height:96px}
.hk-home .ring-wrap svg{width:96px;height:96px;transform:rotate(-90deg)}
.hk-home .ring-bg{stroke:rgba(255,255,255,.1)}
.hk-home .ring-fg{stroke:var(--good);stroke-linecap:round}
.hk-home .ring-label{position:absolute;inset:0;display:grid;place-items:center;text-align:center}
.hk-home .ring-label b{display:block;font-size:21px;line-height:1}
.hk-home .ring-label small{display:block;color:var(--muted);font-size:10px;margin-top:3px}
.hk-home .record-stats{display:grid;gap:8px}
.hk-home .rstat{display:flex;gap:8px;align-items:center;color:var(--soft);font-size:12.2px;white-space:nowrap}
.hk-home .rstat .icon{width:14px;height:14px;color:var(--muted)}
.hk-home .record-foot{margin-top:12px}
.hk-home .care-list{display:grid;gap:7px}
.hk-home .care{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:13px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.05);width:100%;text-align:left;transition:background .15s}
.hk-home .care:hover{background:rgba(255,255,255,.08)}
.hk-home .care-ico{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.07);color:#cfdae2;flex:none}
.hk-home .care-ico .icon{width:15px;height:15px}
.hk-home .care b{display:block;font-size:13px}
.hk-home .care small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
.hk-home .chip{margin-left:auto;flex:none;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700}
.hk-home .chip.watch{background:rgba(255,189,92,.14);color:var(--watch)}
.hk-home .chip.plan{background:rgba(142,194,255,.14);color:var(--plan)}
.hk-home .improve{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center}
.hk-home .improve img{width:72px;height:72px;border-radius:11px;object-fit:cover}
.hk-home .improve b{display:block;font-size:14px}
.hk-home .improve span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.hk-home .link-arrow{display:inline-flex;gap:7px;align-items:center;margin-top:12px;font-weight:650;font-size:13px;color:#d8e2ea}
.hk-home .link-arrow:hover{color:#fff}
.hk-home .link-arrow .icon{width:15px;height:15px}
.hk-home .dock{position:relative;z-index:7;display:grid;grid-template-columns:minmax(240px,.92fr) minmax(0,1.15fr) minmax(0,1.15fr) minmax(280px,1fr);gap:13px;
  padding:16px 20px 18px;background:linear-gradient(180deg,#0c1219,#0a0f16);border-top:1px solid var(--line)}
.hk-home .dock-card{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel);padding:14px;display:flex;gap:13px;min-width:0}
.hk-home .dock-intro{flex-direction:column;justify-content:space-between;background:transparent;border-color:transparent;padding:8px 4px}
.hk-home .dock-intro h2{margin:0;font-size:19px;display:flex;align-items:center;gap:10px;white-space:nowrap}
.hk-home .badge{width:25px;height:25px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:#fff;font:700 12.5px var(--sans)}
.hk-home .dock-intro p{margin:8px 0 0;color:var(--muted);font-size:12.8px;max-width:235px}
.hk-home .dock-intro .arrow-btn{margin-top:10px;width:35px;height:35px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line2);color:var(--soft)}
.hk-home .dock-intro .arrow-btn:hover{background:rgba(255,255,255,.07);color:#fff}
.hk-home .dock-card img{width:96px;height:96px;border-radius:13px;object-fit:cover;flex:none}
.hk-home .dock-body{display:flex;flex-direction:column;min-width:0}
.hk-home .dock-body h3{margin:0 0 3px;font-size:15.5px}
.hk-home .dock-body .d1{color:var(--soft);font-size:12.8px}
.hk-home .dock-body .d2{color:var(--muted);font-size:12.3px;margin-top:2px}
.hk-home .dock-body .btn-ghost{margin-top:auto;align-self:flex-start}
.hk-home .ask-panel{flex-direction:column;gap:10px;background:linear-gradient(180deg,#121b26,#101823)}
.hk-home .ask-head{display:flex;gap:9px;align-items:center}
.hk-home .ask-head h3{margin:0;font-size:15.5px}
.hk-home .ai-chip{padding:3px 9px;border-radius:7px;font-size:10.5px;font-weight:800;letter-spacing:.06em;background:rgba(126,221,165,.14);color:var(--good);border:1px solid rgba(126,221,165,.25)}
.hk-home .ask-answer{display:none;padding:11px 13px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid var(--line);font-size:12.8px;color:var(--soft);max-height:120px;overflow:auto}
.hk-home .ask-answer.open{display:block}
.hk-home .ask-answer b{color:var(--ink)}
.hk-home .ask-answer .why{color:var(--muted);display:block;margin-top:5px}
.hk-home .ask-form{display:flex;gap:9px;align-items:center;margin-top:auto}
.hk-home .ask-input{flex:1;min-width:0;background:rgba(255,255,255,.055);border:1px solid var(--line);border-radius:13px;padding:12px 14px;color:var(--ink);font:inherit;font-size:13.5px}
.hk-home .ask-input::placeholder{color:var(--muted)}
.hk-home .ask-send{width:42px;height:42px;flex:none;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(180deg,#f1782c,#e05f14)}
.hk-home .ask-send:hover{filter:brightness(1.07)}
.hk-home .overlay{position:fixed;inset:0;z-index:80;display:none;background:rgba(4,7,11,.62);backdrop-filter:blur(6px)}
.hk-home .overlay.open{display:grid;place-items:center;padding:26px}
.hk-home .sheet{width:min(680px,100%);max-height:86vh;overflow:auto;border-radius:22px;background:var(--panel2);border:1px solid var(--line2);padding:24px;box-shadow:var(--shadow)}
.hk-home .sheet h2{margin:0 0 4px;font:500 26px var(--serif)}
.hk-home .sheet>p{margin:0 0 18px;color:var(--muted);font-size:13.5px}
.hk-home .sys-grid{display:grid;gap:9px}
.hk-home .sys-row{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.05)}
.hk-home .sys-row b{font-size:14px}
.hk-home .sys-row small{display:block;color:var(--muted);font-size:12px;margin-top:1px}
.hk-home .sheet-close{position:sticky;top:0;float:right;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);color:var(--soft)}
.hk-home .page{flex:1;padding:34px 38px 40px;max-width:1160px;width:100%;margin:0 auto}
.hk-home .page-head{margin-bottom:22px}
.hk-home .kicker{color:var(--accent-2);font-size:11.5px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.hk-home .page-head h1{margin:8px 0 6px;font:500 clamp(28px,3vw,40px)/1.06 var(--serif)}
.hk-home .page-head p{margin:0;color:var(--muted);max-width:640px}
.hk-home .cards{display:grid;gap:14px}
.hk-home .cards.two{grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr)}
.hk-home .card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px}
.hk-home .card h2{margin:0 0 12px;font-size:16.5px}
.hk-home .metric{display:flex;justify-content:space-between;align-items:baseline;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.hk-home .metric:last-child{border-bottom:0}
.hk-home .metric b{font-size:19px}
.hk-home .metric span{color:var(--muted);font-size:12.5px}
.hk-home .timeline{display:grid;gap:9px}
.hk-home .t-row{display:grid;grid-template-columns:92px 1fr;gap:14px;padding:13px 15px;border-radius:14px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.05)}
.hk-home .t-row time{color:var(--muted);font-size:12px;padding-top:2px}
.hk-home .t-row b{font-size:14px}
.hk-home .t-row span{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.hk-home .toast{position:fixed;z-index:120;right:22px;bottom:22px;padding:12px 16px;border-radius:12px;background:#e9eef3;color:#101820;font-weight:650;font-size:13.5px;
  opacity:0;transform:translateY(8px);transition:.2s;pointer-events:none;box-shadow:0 12px 30px rgba(0,0,0,.4)}
.hk-home .toast.show{opacity:1;transform:none}
.hk-home .mobile-top, .hk-home .mobile-tabs{display:none}
@media (max-width:1180px){
.hk-home{--rail-w:0px}
.hk-home .rail{position:static;width:auto;overflow:visible;padding:16px 22px 4px;background:var(--bg2);flex-direction:row;flex-wrap:wrap}
.hk-home .rail-card{flex:1 1 280px}
.hk-home .stage-wrap{min-height:0;flex:none}
.hk-home .stage{min-height:480px;flex:none}
.hk-home .stage-top, .hk-home .stage-controls{right:30px}
.hk-home .dock{grid-template-columns:1fr 1fr}
.hk-home .dock-intro{grid-column:1/-1;flex-direction:row;align-items:center;padding:2px 4px}
.hk-home .dock-intro p{margin:0 0 0 8px}
.hk-home .dock-intro .arrow-btn{margin:0 0 0 auto}
.hk-home .ask-panel{grid-column:1/-1}
}
@media (max-width:760px){
.hk-home .app{display:block}
.hk-home .nav{display:none}
.hk-home .mobile-top{position:sticky;top:0;z-index:60;display:flex;justify-content:space-between;align-items:center;gap:10px;
    padding:12px 16px;background:rgba(9,14,20,.9);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.hk-home .mobile-top .brand{padding:0}
.hk-home .mobile-top .brand b{font-size:17px}
.hk-home .mobile-top .brand svg{width:26px;height:26px}
.hk-home .m-weather{display:flex;gap:7px;align-items:center;color:var(--soft);font-size:13px;font-weight:650}
.hk-home .m-weather .icon{color:#ffca7a}
.hk-home .mobile-tabs{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(4,1fr);
    padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:rgba(9,14,20,.94);backdrop-filter:blur(14px);border-top:1px solid var(--line)}
.hk-home .mobile-tabs button{display:grid;justify-items:center;gap:4px;padding:7px 4px;border-radius:11px;color:var(--muted);font-size:10.5px;font-weight:700}
.hk-home .mobile-tabs button[aria-current="page"]{color:var(--accent-2)}
.hk-home .main{padding-bottom:64px}
.hk-home .stage{min-height:76vh}
.hk-home .marker[data-system="roof"]{left:50%!important;top:42%!important}
.hk-home .marker[data-system="windows"]{left:72%!important;top:56%!important}
.hk-home .marker[data-system="electrical"]{left:26%!important;top:62%!important}
.hk-home .marker[data-system="ac"]{left:16%!important;top:70%!important}
.hk-home .marker[data-system="water-heater"]{left:63%!important;top:66%!important}
.hk-home .stage-top{left:16px;right:16px;top:16px;flex-direction:column}
.hk-home .weather{display:none}
.hk-home .condition{width:100%;margin-top:12px}
.hk-home .address h1{font-size:27px}
.hk-home .stage-controls{left:16px;right:16px;bottom:14px}
.hk-home .seg button{padding:8px 11px;font-size:12.5px}
.hk-home .seg button .icon{display:none}
.hk-home .marker b{font-size:12.5px}
.hk-home .marker small{font-size:10.5px}
.hk-home .marker-ico{width:26px;height:26px}
.hk-home .rail{padding:14px 14px 2px}
.hk-home .dock{grid-template-columns:1fr;padding:14px}
.hk-home .dock-card img{width:84px;height:84px}
.hk-home .page{padding:22px 16px 30px}
.hk-home .cards.two{grid-template-columns:1fr}
.hk-home .provenance{left:16px;right:16px;bottom:66px}
.hk-home .popover{width:min(296px,calc(100vw - 32px))}
}
@media (prefers-reduced-motion:reduce){
.hk-home *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}

/* ---------- PR 2 integration layer ----------
 * A handful of wrapper classes the controller relies on that are not part of
 * the original home.html composition. Scoped under .hk-home like everything
 * else. Kept minimal so the approved composition is unchanged.
 */
.hk-home{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;position:relative;overflow:hidden;border-radius:14px}
.hk-home .view{min-height:0}
.hk-home .stage-wrap{min-height:560px}

/* Markers live directly on the stage; the wrapper must not create a new
 * positioning context or the absolute anchors would break. */
.hk-home .hk-markers{display:contents}

/* Dock: intro + attention cards + Ask, as a responsive row instead of a fixed
 * four-column grid, because the number of attention cards is data-driven. */
.hk-home .dock{display:flex;flex-wrap:wrap;gap:13px}
.hk-home .dock-intro{flex:0 0 232px}
.hk-home .hk-attention-cards{flex:1 1 420px;display:grid;grid-template-columns:repeat(auto-fill,minmax(238px,1fr));gap:13px;min-width:0}
.hk-home .ask-panel{flex:1 1 300px;min-width:0}

/* Honest empty-state copy in the rails. */
.hk-home .hk-empty{margin:2px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}

/* Preview-only data-mode strip; hidden in production. A full-width strip above
 * the stage rather than an overlay, so it never covers a marker or the address. */
.hk-home .hk-mode-badge{display:block;width:100%;text-align:center;
  padding:6px 13px;font-size:11.5px;font-weight:700;letter-spacing:.03em;
  background:rgba(142,194,255,.12);color:var(--plan);border-bottom:1px solid rgba(142,194,255,.22)}

@media (max-width:760px){
  .hk-home{border-radius:0}
  .hk-home .dock{flex-direction:column}
  .hk-home .dock-intro,.hk-home .hk-attention-cards,.hk-home .ask-panel{flex:1 1 auto}
}

/* ---------- Optional spatial layer (PR 3) ----------
 * The premium renderer's canvas. Sits above the hero but below every overlay
 * (markers z-4, stage-top z-5, rail z-6, dock z-7) so it can never cover a
 * control or a label. Purely decorative: pointer-events none, aria-hidden.
 */
.hk-home .hk-spatial-layer{position:absolute;inset:0;z-index:2;pointer-events:none;width:100%;height:100%}

/* When a system is focused, calm the non-focused chrome so attention lands on
 * the spotlight. Works with or without the premium renderer. */
.hk-home .stage.is-focus .marker:not(.is-focused){opacity:.35}
.hk-home .stage.is-focus .marker.is-focused{border-color:rgba(255,255,255,.34);transform:translate(-50%,-50%) scale(1.06)}
