/* Shell: app-style top bar (menu, search, profile). Everything else lives in the menu or the profile sheet. */
html body .platform-bar{position:relative!important;z-index:100;display:flex!important;align-items:center!important;gap:10px!important;height:auto!important;min-height:calc(60px + env(safe-area-inset-top,0px))!important;padding:calc(8px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right)) 6px max(16px,env(safe-area-inset-left))!important;background:var(--bg,#ffffff)!important;border:0!important;box-shadow:none!important}
html body .platform-bar>*:not(#appMenuButton):not(#cuSearch):not(#cuWatch):not(#cuProfile):not(#cuBell){display:none!important}
#cuSearch{position:relative;flex:1 1 auto;max-width:none;min-width:0;margin:0;display:block}
#cuSearch input{width:100%;height:44px;box-sizing:border-box;border-radius:22px;border:1px solid var(--brand-line,#d8dbea);background:var(--panel,#fff);color:var(--ink,#171827);padding:0 16px 0 44px;font:inherit;font-size:16px;outline-offset:2px}
#cuSearch svg{position:absolute;left:14px;top:12px;width:20px;height:20px;stroke:var(--ink2,#6b7088);fill:none;stroke-width:2;stroke-linecap:round;pointer-events:none}
#cuProfile{flex:0 0 auto;width:44px;height:44px;margin-left:0;border-radius:50%;border:1px solid var(--brand-line,#d8dbea);background:var(--brand-soft,#eef0ff);color:var(--brand-link,#3a4bbd);display:grid;place-items:center;padding:0;cursor:pointer}
#cuProfile svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#cuProfile .cu-dot{position:absolute;margin:-26px -26px 0 0;width:10px;height:10px;border-radius:50%;background:#f5a524;border:2px solid var(--bg,#fff);display:none}
#cuProfile.warn .cu-dot{display:block}
#appMenuButton{flex:0 0 auto}
#cuSheet{position:fixed;inset:0;z-index:1200;display:flex;align-items:flex-end;justify-content:center;background:#05081070}
#cuSheet[hidden]{display:none}
#cuSheet .cu-panel{width:min(440px,100%);max-height:88dvh;overflow:auto;box-sizing:border-box;background:var(--panel,#fff);color:var(--ink,#171827);border-radius:24px 24px 0 0;padding:14px 14px calc(16px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 40px #0004}
#cuSheet h3{margin:12px 6px 6px;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink2,#6b7088);font-weight:800}
#cuSheet h3:not(:first-of-type){border-top:1px solid var(--line,var(--brand-line,#e0e3f0));margin:14px 0 6px;padding:14px 6px 0}
#cuSheet .cu-seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#cuSheet button.cu-b{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 14px;border-radius:14px;border:1px solid var(--brand-line,#e0e3f0);background:transparent;color:inherit;font:inherit;font-weight:700;font-size:15px;text-align:left;cursor:pointer}
#cuSheet button.cu-b[aria-pressed=true]{background:var(--ink,#171827);color:var(--bg,#fff);border-color:transparent}
#cuSheet .cu-list{display:grid;gap:6px}
#cuSheet .cu-grip{width:40px;height:4px;border-radius:2px;background:var(--brand-line,#cfd3e6);margin:0 auto 6px}
#cuSheet .cu-warn{margin-left:auto;font-size:12px;color:#b45309;font-weight:700}
@media(min-width:861px){#cuSheet{align-items:flex-start;justify-content:flex-end;background:transparent}#cuSheet .cu-panel{margin:64px 16px 0;border-radius:18px;border:1px solid var(--brand-line,#e0e3f0);box-shadow:0 18px 50px #0003}}
/* drawer workspace switch */
#appDrawer .cu-ws{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:4px 0 10px}
#appDrawer .cu-ws button{min-height:40px;border-radius:12px;border:1px solid var(--brand-line,#e0e3f0);background:transparent;color:inherit;font:inherit;font-weight:700;font-size:13px;cursor:pointer}
#appDrawer .cu-ws button[aria-pressed=true]{background:var(--ink,#171827);color:var(--bg,#fff);border-color:transparent}
.cq-hidden{display:none!important}
.cq-i{display:inline-grid;place-items:center;width:24px;height:24px;margin:0 6px 4px 0;padding:0;border-radius:50%;border:1px solid currentColor;background:transparent;color:inherit;opacity:.55;font:italic 700 13px/1 Georgia,serif;cursor:help;position:relative}
.cq-i:hover,.cq-i[aria-expanded=true]{opacity:1}
#workspaceFrames{position:relative}

@media(min-width:861px){html body .platform-bar{padding-left:28px!important;padding-right:28px!important}}
#cuSheet .cu-main{margin-top:4px;min-height:52px;background:var(--brand-soft,#eef0ff);border-color:transparent;color:var(--brand-link,#3a4bbd)}
#cuSheet .cu-main[aria-pressed=true]{background:var(--ink,#171827);color:var(--bg,#fff)}
#appDrawer [data-app-tool=watch]{font-weight:800}
#appDrawer{overflow-y:auto!important}

#cuWatch{flex:0 0 auto;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;height:44px;padding:0;border-radius:22px;border:1px solid var(--brand-line,#d8dbea);background:var(--brand-soft,#eef0ff);color:var(--brand-link,#3a4bbd);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
#cuWatch svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#cuWatch span{display:none}
#cuWatch[aria-pressed=true]{background:var(--brand-action,#3a4bbd);border-color:transparent;color:var(--brand-on-action,#fff)}
@media(min-width:861px){#cuWatch{padding:0 16px 0 12px}#cuWatch span{display:inline}}

@keyframes cu-up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}@keyframes cu-in{from{opacity:0}to{opacity:1}}
#cuSheet:not([hidden]){animation:cu-in .2s ease both}#cuSheet:not([hidden]) .cu-panel{animation:cu-up .3s cubic-bezier(.2,.8,.2,1) both}
#cuWatch,#cuProfile{transition:transform .14s ease,background-color .18s ease}#cuWatch:active,#cuProfile:active{transform:scale(.95)}
@media (prefers-reduced-motion:reduce) and (max-width:0px){#cuSheet,#cuSheet .cu-panel{animation:none!important}}

/* Idea radar: a normal page inside the workspace area, like the others */
html body #workspaceFrames>#shellRadarDialog{position:absolute;inset:0;z-index:15;display:block;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;background:var(--bg)!important;color:var(--ink);overflow:auto;padding:clamp(18px,3vw,34px) clamp(16px,3vw,34px) 40px;animation:cu-in .25s ease both}
html body #workspaceFrames>#shellRadarDialog:not([open]){display:none}
html body #workspaceFrames>#shellRadarDialog>*{max-width:1100px;margin-inline:auto}
html body #shellRadarDialog .radar-head h2{font-family:var(--font-display,inherit);letter-spacing:-.03em}
.settings-hint:empty{display:none}
/* Scans & sync */
#healthBody{display:grid;gap:14px;margin:14px 0}
.hl-sum{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:16px;border:1px solid var(--line);background:var(--s2)}
.hl-sum b{display:block;font-size:16px;color:var(--ink)}.hl-sum small{color:var(--muted)}
.hl-dot{width:12px;height:12px;border-radius:50%;background:#9aa3b2;flex:none}
.hl-sum.ok .hl-dot{background:#22a45d;box-shadow:0 0 0 5px #22a45d26}.hl-sum.warn .hl-dot{background:#e8892b;box-shadow:0 0 0 5px #e8892b26}
.hl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}
.hl-card{display:grid;gap:6px;align-content:start;padding:16px;border-radius:18px;border:1px solid var(--line);background:var(--s1);border-top:4px solid #9aa3b2}
.hl-card.ok{border-top-color:#22a45d}.hl-card.warn{border-top-color:#e8892b}
.hl-card header{display:flex;align-items:center;gap:8px}
.hl-card h3{margin:0;font-size:15px;color:var(--ink);flex:1}
.hl-ico{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:var(--s2);color:var(--ink);font-size:13px}
.hl-pill{font-size:11px;font-weight:800;padding:4px 9px;border-radius:99px;background:var(--s2);color:var(--muted);white-space:nowrap}
.hl-card.ok .hl-pill{background:#22a45d1f;color:#198347}.hl-card.warn .hl-pill{background:#e8892b24;color:#b3600f}
:root[data-theme=dark] .hl-card.ok .hl-pill{color:#6ee7a0}:root[data-theme=dark] .hl-card.warn .hl-pill{color:#ffb36b}
.hl-big{font-family:var(--font-display,inherit);font-size:30px;font-weight:800;letter-spacing:-.03em;color:var(--ink);margin-top:6px}
.hl-sub{font-size:12px;color:var(--muted)}
.hl-bar{height:8px;border-radius:99px;background:var(--s2);overflow:hidden;margin-top:8px}.hl-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#e8892b,#f4d34f,#22a45d);background-size:200px 100%}
.hl-ends{display:flex;justify-content:space-between;font-size:10.5px;color:var(--muted)}
.hl-fail{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px;max-height:190px;overflow:auto}
.hl-fail li{display:grid;gap:1px;padding:8px 10px;border-radius:10px;background:var(--s2);font-size:12.5px}.hl-fail a,.hl-fail b{color:var(--ink);font-weight:700}.hl-fail span{color:var(--muted);font-size:11.5px}

/* no white flash while a workspace (iframe) paints: same canvas colour and colour scheme as the app */
html{color-scheme:light}html[data-theme=dark]{color-scheme:dark}
#workspaceFrames>iframe{background:var(--bg);border:0}

/* no blue anywhere: tap flash, text selection, focus ring */
html,html *{-webkit-tap-highlight-color:transparent}
html ::selection{background:rgba(128,128,128,.28);color:inherit}
html :focus-visible{outline-color:currentColor}
html{accent-color:currentColor}

/* Scan health is a page inside the workspace area, like Radar */
html body #workspaceFrames>#shellHealthDialog[open]{position:absolute;inset:0;z-index:16;display:block;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;background:var(--bg)!important;color:var(--ink);overflow:auto;padding:clamp(18px,3vw,34px) clamp(16px,3vw,34px) 40px;animation:cu-in .25s ease both}
html body #workspaceFrames>#shellHealthDialog[open]>*{max-width:1100px;margin-inline:auto}
@media(min-width:861px){html body #workspaceFrames>#shellHealthDialog[open]{position:fixed!important;top:var(--bar-h,64px);left:72px;right:0;bottom:0;width:auto!important;height:auto!important;z-index:20}}
html body .platform-bar>#cuBell{display:inline-grid!important}
@media(min-width:861px){html body .platform-bar>#cuProfile{display:none!important}}
