/* Smile is a permanent member of the application shell. Route content can
   change without moving or resizing its canvas. The shell grid, not a
   collection of page-specific absolute coordinates, establishes its place. */
#main{
 --smile-content-gutter:clamp(18px,2.08vw,44px);
 --smile-intro-top:clamp(28px,2.5vw,48px);
}
/* Each category owns its contents, but not a different horizontal origin.
   This shared content track applies to actual surfaces instead of assigning
   pixel coordinates to each page or moving the mascot as the user navigates. */
#main:not(:has(.nw-root)) .container,#main:not(:has(.nw-root)) .workspace .container,
#main:not(:has(.nw-root)) .customer-inner,#main:not(:has(.nw-root)) .plugins-inner,#main:not(:has(.nw-root)) .team-page{
 box-sizing:border-box;width:100%;max-width:none;margin-inline:0;
 padding-inline:var(--smile-content-gutter);
}
#main:not(:has(.nw-root)) .subhero{padding-top:var(--smile-intro-top)}
/* The persistent performer occupies the centered upper stage. Public copy
   starts below that stage instead of trying to share the same coordinates. */
@media(min-width:960px){
 body[data-smile-shell="studio"] #main:not(:has(.nw-root)) .subhero,
 body[data-smile-shell="studio"] #main:not(:has(.nw-root)) .hero-inner.home-command:not(:has(.smile-assistant[data-surface=workspace])){
  padding-top:max(var(--smile-intro-top),calc(var(--smile-stage-bottom) - var(--smile-shell-top) + 18px));
 }
}
#main:not(:has(.nw-root)) .customer-landscape-inner{padding-top:var(--smile-intro-top)}
#main:not(:has(.nw-root)) .plugins-page,#main:not(:has(.nw-root)) .workspace{padding-top:var(--smile-intro-top)}
#main:not(:has(.nw-root)) .team-page{padding-top:var(--smile-intro-top)}
#main:not(:has(.nw-root)) .hero-inner.home-command:not(:has(.smile-assistant[data-surface=workspace])){
 width:100%;max-width:none;
 padding:var(--smile-intro-top) var(--smile-content-gutter) 32px;
}
#main:not(:has(.nw-root)) .sw-workspace:not([data-view=work]){
 padding:var(--smile-intro-top) var(--smile-content-gutter) 16px;
}
.smile-companion-rail{
 box-sizing:border-box;min-width:0;align-self:start;
 padding:clamp(20px,3vw,48px) clamp(12px,1.45vw,24px);
 background:radial-gradient(ellipse at 50% 33%,#117ed524,transparent 74%);
}
.smile-companion-rail .smile-living-presence{
 display:grid;justify-items:stretch;align-content:start;
 width:100%;min-width:0;background:none;
}
.smile-companion-rail .smile-living-presence .face-stage{
 width:100%;height:auto;max-width:none;aspect-ratio:1.12;
 min-height:0;overflow:visible;margin:0;background:transparent;
}
.smile-companion-rail .smile-living-presence .presence-progress{
 display:flex;justify-content:center;flex-wrap:wrap;
 min-height:2.3rem;padding:.35rem .25rem;
 font-size:clamp(.7rem,.85vw,.8rem);line-height:1.4;
 white-space:normal;text-align:center;
}
.smile-companion-rail .presence-progress[data-state="idle"]{display:none}
/* Same-shell event instrument: it may grow below the portrait, but never
   changes the actor's intrinsic dimensions or its actual canvas lease. */
.smile-companion-rail .smile-living-presence[data-presence-live="true"]>.presence-progress{display:none}
.presence-live{width:100%;max-width:100%;min-width:0;padding:3px 8px 8px}
.presence-live[hidden]{display:none}
.presence-live-trigger{display:flex;align-items:center;width:100%;min-width:0;gap:8px;border:1px solid #288dca45;border-radius:10px;background:linear-gradient(125deg,#041d39b0,#091932b9);padding:10px 10px;color:#b9ebff;font-size:12px;font-weight:600;text-align:left;box-shadow:inset 0 1px #40b8e619}
.presence-live-trigger:not(:disabled):hover,.presence-live-trigger[aria-expanded="true"]{border-color:#54d5ff8c;background:linear-gradient(125deg,#08375cdd,#092a51d9)}
.presence-live-trigger:disabled{cursor:default}
.presence-live-marker{width:7px;height:7px;flex:none;border-radius:100%;background:#1ae1ff;box-shadow:0 0 10px #009cfb8e}
.presence-live[data-connection="stale"] .presence-live-marker{background:#ffba73;box-shadow:0 0 10px #e3975485}
.presence-live-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.presence-live-count{font:600 11px/1.1 ui-monospace,monospace;color:#97f8ff}
.presence-live-chevron{color:#78a7c1}
.presence-live-trigger:disabled .presence-live-chevron{opacity:0}
.presence-live-detail{color:#91bfda;font-size:11px;line-height:1.5;margin:7px 4px 0;overflow-wrap:anywhere}
.presence-live-jobs{display:grid;gap:5px;margin-top:8px}
.presence-live-jobs[hidden]{display:none}
.presence-live-job{display:block;width:100%;min-width:0;text-align:left;line-height:1.5;font-size:11px;color:#d0eafb;border:1px solid #2199cd3c;background:#071c35d4;border-radius:8px;padding:9px;overflow-wrap:anywhere}
.presence-live-job[aria-pressed="true"]{border-color:#55d5ff;background:#0c3e68}
.presence-live-job:hover{background:#135078}
.presence-live-job-head{display:flex;align-items:baseline;gap:10px;min-width:0}
.presence-live-job-name{min-width:0;flex:1;overflow-wrap:anywhere}
.presence-live-job-metric{flex:none;color:#a4defb;font:600 10px/1.5 ui-monospace,monospace}
.presence-live-job-track{position:relative;display:block;overflow:hidden;margin-top:8px;width:100%;height:3px;background:#36729a4b;border-radius:10px}
.presence-live-job-fill{position:absolute;inset:0;transform-origin:left center;background:linear-gradient(90deg,#116ae9,#33d8ff);transition:transform .23s cubic-bezier(.23,.85,.25,1)}
.presence-live-job-track[data-state="unmeasured"] .presence-live-job-fill{width:35%;inset:0 auto 0 0;transform:none;background:linear-gradient(90deg,transparent,#55d6ff,transparent);animation:smile-live-scan 1.4s linear infinite}
.presence-live-job-track[data-state="queued"] .presence-live-job-fill{width:18%;inset:0 auto 0 0;transform:none;background:#609cc5;animation:none}
.presence-live-job-track[data-state="waiting_browser"] .presence-live-job-fill{width:18%;inset:0 auto 0 0;transform:none;background:#8094b4;animation:none}
.presence-live-job-track[data-state="stopping"] .presence-live-job-fill{width:18%;inset:0 auto 0 0;transform:none;background:#e7a65b;animation:none}
.presence-live-job-track[data-state="stop_pending"] .presence-live-job-fill{width:18%;inset:0 auto 0 0;transform:none;background:#e7a65b;animation:none}
.presence-live[data-connection="stale"] .presence-live-job-fill{animation-play-state:paused}
@keyframes smile-live-scan{from{left:-35%}to{left:100%}}
@media(prefers-reduced-motion:reduce){
 .presence-live-job-fill{transition:none}
 .presence-live-job-track[data-state="unmeasured"] .presence-live-job-fill{animation:none;left:0;opacity:.7}
}
/* One persistent WebGL performer, with route-owned stage placement.
   The public app-shell stage is document-bound: after navigating to a service
   section it scrolls away rather than obscuring the customer's content.
   Conversation routes instead reserve a real header slot for this same actor.
   The Three.js camera still follows the actual stage rectangle. */
:root{--smile-chrome-height:112px;--smile-stage-top:-27px;--smile-stage-height:215px;--smile-stage-bottom:calc(var(--smile-stage-top) + var(--smile-stage-height))}
body:has(.signin-page)>:is(#smile-companion-rail,#smile-activity-dock){display:none}
body:not(:has(.signin-page))>#smile-companion-rail{
 position:absolute;z-index:22;top:var(--smile-stage-top);
 left:calc(50% + 56px);transform:translateX(-50%);
 width:clamp(275px,23vw,310px);height:var(--smile-stage-height);min-width:0;
 margin:0;padding:0;border:0;background:none;box-shadow:none;
 overflow:visible;pointer-events:none;
}
body:not(:has(.signin-page))>#smile-companion-rail .smile-living-presence{
 display:block;width:100%;height:100%;min-width:0;background:none;
}
body:not(:has(.signin-page))>#smile-companion-rail .face-stage{
 display:block;width:100%;height:100%;min-width:0;max-width:none;
 min-height:0;aspect-ratio:auto;margin:0;overflow:hidden;
 border:0;background:transparent;filter:drop-shadow(0 8px 18px #74a5ea55);
}
body:not(:has(.signin-page))>#smile-companion-rail .presence-progress{
 position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;
 padding:0;border:0;clip-path:inset(50%);white-space:nowrap;
}
/* Situation and execution belong to independently sized interface panels,
   and cannot contribute children to the actor's rendering rectangle. */
#smile-activity-dock{
 right:clamp(12px,1.6vw,26px);z-index:45;
 font:inherit;color:#e1efff;min-width:0;
}
#smile-activity-dock[hidden]{display:none}
#smile-activity-dock{position:fixed;top:12px;width:min(280px,calc(100vw - 28px));pointer-events:none}
#smile-activity-dock .presence-live{
 width:100%;max-width:100%;min-width:0;padding:0;pointer-events:auto;
}
#smile-activity-dock .presence-live[hidden]{display:none}
#smile-activity-dock .presence-live-detail{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 overflow:hidden;overflow-wrap:normal;line-height:1.35;
}
#smile-activity-dock[data-placement="workspace"]{
 position:relative;top:auto;right:auto;bottom:auto;
 width:min(400px,100%);margin:0 0 8px auto;
 pointer-events:auto;flex:none;align-self:flex-end;
}
#smile-activity-dock[data-placement="workspace"] .presence-live{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);
 align-items:center;gap:7px;
 padding:0;
}
#smile-activity-dock[data-placement="workspace"] .presence-live[hidden]{display:none}
#smile-activity-dock[data-placement="workspace"] .presence-live-trigger{min-height:32px;padding:6px 9px}
#smile-activity-dock[data-placement="workspace"] .presence-live-detail{
 display:block;margin:0;line-height:1.4;
 max-height:3.3em;overflow:hidden;
}
#smile-activity-dock[data-placement="workspace"] .presence-live-jobs{
 grid-column:1/-1;max-height:min(38dvh,300px);overflow-y:auto;
}
@media(min-width:721px) and (max-width:959px){
 body:not(:has(.signin-page))>#smile-companion-rail{
  top:-8px;left:50%;width:166px;height:116px;
 }
 body:not(:has(.signin-page))>#smile-companion-rail .face-stage{height:116px}
 #smile-activity-dock{top:8px;width:min(230px,calc(100vw - 28px))}
 #main{--smile-content-gutter:clamp(12px,2vw,24px)}
}
@media(max-width:720px){
 body:not(:has(.signin-page))>#smile-companion-rail{
  top:0;left:calc(50% - 19px);width:76px;height:70px;
 }
 body:not(:has(.signin-page))>#smile-companion-rail .face-stage{height:70px}
 #smile-activity-dock{
  top:auto;bottom:max(10px,env(safe-area-inset-bottom));right:10px;
  width:min(200px,calc(100vw - 24px));
 }
 #smile-activity-dock .presence-live-trigger{min-height:31px;padding:6px 7px;font-size:10px}
 /* Keep the last confirmed work measurement visible on phones. Hiding the
    entire detail left an "active task" badge with no actual progress or
    reconnect information; clamp the message instead of discarding it. */
 #smile-activity-dock .presence-live-detail{display:-webkit-box;font-size:10px;line-height:1.32;margin:5px 2px 0;-webkit-line-clamp:2}
 #smile-activity-dock[data-placement="workspace"]{
  top:auto;bottom:auto;right:auto;width:100%;margin:69px 0 7px;
  align-self:stretch;
 }
 #smile-activity-dock[data-placement="workspace"] .presence-live{
  grid-template-columns:minmax(0,1fr);gap:3px;
 }
 #smile-activity-dock[data-placement="workspace"] .presence-live-trigger{
  font-size:11px;min-height:33px;
 }
 #smile-activity-dock[data-placement="workspace"] .presence-live-detail{
  display:block;margin:0 4px 3px;font-size:10px;line-height:1.35;max-height:2.7em;
 }
 #main{--smile-content-gutter:10px}
}
/* Authentication uses the same physical actor in the existing threshold. */
.auth-face-host .smile-living-presence{display:block;width:100%;height:100%;background:none}
.auth-face-host .smile-living-presence .face-stage{height:100%;aspect-ratio:auto}
.auth-face-host .smile-living-presence .presence-progress{display:none}
/* Home and Contact no longer reserve phantom columns for duplicate avatars. */
.public-presence{grid-template-columns:minmax(0,1fr);width:min(920px,100%);justify-items:start;padding-inline:clamp(12px,2vw,32px)}
.public-presence-copy{max-width:720px}



/* The project rail owns only project/conversation navigation inside Workbench.
   It does not resize the global shell or reparent the live Smile actor. */

:root{--smile-route-depth:22px}
@keyframes smile-route-old{
 to{opacity:.08;transform:perspective(1100px) translate3d(-12px,4px,-55px) rotateY(-1.2deg) scale(.985);
    filter:saturate(.84)}
}
@keyframes smile-route-new{
 from{opacity:.08;transform:perspective(1100px) translate3d(16px,3px,-42px) rotateY(1.2deg) scale(.98);
    filter:saturate(.85)}
 to{opacity:1;transform:perspective(1100px) translate3d(0,0,0) rotateY(0) scale(1);
    filter:saturate(1)}
}
::view-transition-old(smile-route-surface){
 animation:smile-route-old 170ms cubic-bezier(.5,0,.7,.3) both;
 transform-origin:center center;
}
::view-transition-new(smile-route-surface){
 animation:smile-route-new 255ms cubic-bezier(.16,1,.3,1) both;
 transform-origin:center center;
}
@media(prefers-reduced-motion:reduce){
 ::view-transition-old(smile-route-surface),
 ::view-transition-new(smile-route-surface){animation-duration:0.01ms!important}
}
