/* Unified line icons: same shape and color in mobile and desktop. */
#theme,#login-theme {
  color:var(--secondary);
  display:inline-flex;align-items:center;justify-content:center;
}
#theme .theme-icon,#login-theme .theme-icon {
  display:block;width:19px;height:19px;flex:none;
  stroke:currentColor;fill:none;
  transition:transform .28s cubic-bezier(.2,.82,.24,1),opacity .23s ease;
}
#theme .theme-icon-sun,#login-theme .theme-icon-sun{display:none}
:root[data-theme="dark"] #theme .theme-icon-sun,
:root[data-theme="dark"] #login-theme .theme-icon-sun{display:block}
:root[data-theme="dark"] #theme .theme-icon-moon,
:root[data-theme="dark"] #login-theme .theme-icon-moon{display:none}
@media(hover:hover) and (pointer:fine){
  #theme:hover .theme-icon,#login-theme:hover .theme-icon{transform:rotate(-12deg) scale(1.04)}
}

/*
 * Ambient light behind real translucent surfaces.
 * Composited, slow transforms instead of animated gradient repaints.
 * Both themes and mobile share the same ambient system at different strength.
 */
body { isolation:isolate; }
body::before,body::after {
  content:'';position:fixed;inset:0;z-index:0;
  pointer-events:none;user-select:none;
  background-repeat:no-repeat;
  transform-origin:center;
  will-change:transform,opacity;
}
body::before {
  background:
    radial-gradient(ellipse 53% 46% at 14% 15%,
      rgba(170,132,242,.20),rgba(170,132,242,.065) 47%,transparent 81%),
    radial-gradient(ellipse 53% 48% at 94% 70%,
      rgba(113,181,238,.18),rgba(113,181,238,.042) 45%,transparent 83%);
  opacity:.66;
  animation:ds-ambient-drift 34s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(ellipse 50% 47% at 84% 13%,
      rgba(233,158,214,.13),rgba(233,158,214,.025) 50%,transparent 83%),
    radial-gradient(ellipse 49% 46% at 24% 87%,
      rgba(147,133,231,.16),rgba(147,133,231,.030) 51%,transparent 85%);
  opacity:.62;
  animation:ds-ambient-float 43s ease-in-out infinite alternate;
}
/* Content above ambient light; dialogs remain in the browser's top layer. */
#login,#workspace { position:relative;z-index:1; }
:root[data-theme="dark"] body::before{
  background:
    radial-gradient(ellipse 52% 48% at 16% 15%,
      rgba(134,91,217,.19),rgba(134,91,217,.041) 49%,transparent 81%),
    radial-gradient(ellipse 55% 50% at 90% 74%,
      rgba(70,106,195,.18),rgba(70,106,195,.030) 48%,transparent 85%);
  opacity:.64;
}
:root[data-theme="dark"] body::after{
  background:
    radial-gradient(ellipse 48% 46% at 84% 10%,
      rgba(204,108,177,.105),transparent 78%),
    radial-gradient(ellipse 51% 47% at 22% 90%,
      rgba(130,96,208,.15),transparent 83%);
  opacity:.57;
}
@keyframes ds-ambient-drift {
  0%{transform:translate3d(-2.2%,1.5%,0) scale(1.035)}
  50%{transform:translate3d(1.8%,-1.7%,0) scale(1.085)}
  100%{transform:translate3d(3.4%,1%,0) scale(1.045)}
}
@keyframes ds-ambient-float {
  0%{transform:translate3d(2%,-1%,0) scale(1.055)}
  50%{transform:translate3d(-1.4%,2.2%,0) scale(1.09)}
  100%{transform:translate3d(-3.5%,-.5%,0) scale(1.04)}
}
@media(max-width:720px) {
  body::before {opacity:.44;animation-duration:43s;}
  body::after {opacity:.37;animation-duration:55s;}
  :root[data-theme="dark"] body::before {opacity:.42;}
  :root[data-theme="dark"] body::after {opacity:.36;}
}
@media(prefers-reduced-motion:reduce){
  body::before,body::after{
    animation:none!important;transform:none!important;will-change:auto;
    opacity:.40;
  }
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
  body::before,body::after{
    animation:none!important;opacity:0!important;will-change:auto;
  }
}

/*
 * Phase 2F — DeepScope Liquid Glass, desktop.
 * This layer only owns widths >=721px. Mobile keeps mobile-luxe.css.
 * Real translucency / soft glass highlights without text blurring or noisy FX.
 */
@media (min-width:721px) {
  :root {
    --desktop-edge:rgba(255,255,255,.80);
    --desktop-reflection:rgba(255,255,255,.72);
    --desktop-shadow:0 24px 72px rgba(48,34,84,.105),0 4px 15px rgba(48,34,84,.04);
    --desktop-card-shadow:0 18px 46px rgba(50,38,80,.048),0 2px 8px rgba(50,38,80,.028);
    --desktop-spring:cubic-bezier(.2,.82,.24,1);
  }
  :root[data-theme="dark"] {
    --desktop-edge:rgba(255,255,255,.16);
    --desktop-reflection:rgba(255,255,255,.14);
    --desktop-shadow:0 25px 85px rgba(0,0,0,.37),0 4px 17px rgba(0,0,0,.16);
    --desktop-card-shadow:0 17px 47px rgba(0,0,0,.22),0 2px 9px rgba(0,0,0,.12);
  }
  body {
    background:
      radial-gradient(ellipse 48% 42% at 92% 6%,rgba(150,116,234,.16),transparent 79%),
      radial-gradient(ellipse 38% 50% at 33% 94%,rgba(100,166,221,.115),transparent 78%),
      radial-gradient(ellipse 55% 55% at 13% 16%,rgba(190,145,242,.07),transparent 80%),
      var(--bg);
    background-attachment:fixed;
  }
  :root[data-theme="dark"] body {
    background:
      radial-gradient(ellipse 48% 42% at 92% 6%,rgba(127,90,204,.19),transparent 79%),
      radial-gradient(ellipse 38% 50% at 33% 94%,rgba(79,115,184,.10),transparent 78%),
      var(--bg);
    background-attachment:fixed;
  }
  .app-shell { isolation:isolate; }
  .main-area { min-width:0; }
  .sidebar {
    background:linear-gradient(148deg,
      color-mix(in srgb,var(--glass),white 8%),
      color-mix(in srgb,var(--glass),transparent 18%) 66%,
      color-mix(in srgb,var(--glass),var(--soft) 8%));
    border:1px solid color-mix(in srgb,var(--desktop-edge),var(--line) 16%);
    -webkit-backdrop-filter:blur(36px) saturate(185%);
    backdrop-filter:blur(36px) saturate(185%);
    box-shadow:var(--desktop-shadow),inset 0 1px 0 var(--desktop-reflection),
      inset 1px 0 0 color-mix(in srgb,var(--desktop-reflection),transparent 30%);
    transition:border-color .3s ease,box-shadow .3s ease;
    overflow:hidden;
  }
  :root[data-theme="dark"] .sidebar {
    background:linear-gradient(143deg,rgba(57,48,75,.73),rgba(31,28,43,.69) 69%,rgba(40,35,55,.72));
  }
  .sidebar::before {
    content:'';pointer-events:none;position:absolute;inset:0;
    border-radius:inherit;
    background:linear-gradient(125deg,rgba(255,255,255,.14),transparent 35%,transparent 75%,rgba(255,255,255,.035));
    z-index:-1;
  }
  .sidebar>.brand {padding:2px 2px 6px;}
  .sidebar>.brand .brand-mark {
    width:39px;height:39px;border-radius:14px;
    color:#faf6ff;
    background:linear-gradient(135deg,#4b3a68,#272135);
    box-shadow:0 8px 21px rgba(48,33,79,.21),inset 0 1px 0 rgba(255,255,255,.28);
  }
  .sidebar>.brand strong {font-weight:760;letter-spacing:-1.1px;font-size:23px}
  .sidebar>.brand strong span {font-weight:480}
  .workspace-label{letter-spacing:1.5px;font-weight:670}
  .sidebar nav {gap:7px;margin-top:35px}
  .sidebar .nav-item {
    position:relative;
    border-radius:17px;
    transition:transform .32s var(--desktop-spring),background .22s ease,
      color .22s ease,box-shadow .25s ease,border-color .25s ease;
  }
  .sidebar .nav-item svg {opacity:.85;transition:transform .3s var(--desktop-spring),opacity .25s ease;}
  .sidebar .nav-item.active {
    border-color:color-mix(in srgb,var(--desktop-edge),transparent 44%);
    background:linear-gradient(135deg,color-mix(in srgb,var(--soft),white 11%),
      color-mix(in srgb,var(--soft),transparent 18%));
    box-shadow:inset 0 1px 0 var(--desktop-reflection),0 4px 15px rgba(46,32,74,.07);
  }
  .sidebar .nav-item.active::before {
    content:'';pointer-events:none;position:absolute;left:1px;top:23%;bottom:23%;
    width:3px;border-radius:5px;background:var(--accent);
  }
  .sidebar-bottom{border-top-color:color-mix(in srgb,var(--line),transparent 20%)}
  .sidebar-bottom .avatar{
    box-shadow:inset 0 1px 0 var(--desktop-reflection);
    background:linear-gradient(145deg,var(--soft),color-mix(in srgb,var(--soft),transparent 35%));
  }

  /* Top toolbar: optically raised controls, no bulky toolbar container. */
  .topbar {min-width:0;gap:18px;}
  .topbar-actions {gap:10px;}
  .topbar .icon-button,.workspace-picker {
    border:1px solid color-mix(in srgb,var(--desktop-edge),var(--line) 19%);
    background:linear-gradient(145deg,
      color-mix(in srgb,var(--glass),white 13%),
      color-mix(in srgb,var(--glass),transparent 8%));
    box-shadow:0 7px 20px rgba(53,39,84,.055),inset 0 1px 0 var(--desktop-reflection);
    -webkit-backdrop-filter:blur(22px) saturate(165%);
    backdrop-filter:blur(22px) saturate(165%);
    transition:transform .3s var(--desktop-spring),box-shadow .25s ease,border-color .25s ease;
  }
  .topbar .icon-button {width:42px;height:42px;min-width:42px;border-radius:15px;}
  .workspace-picker {width:clamp(145px,16vw,224px);min-height:42px;
    max-width:224px;border-radius:14px;padding:8px 23px 8px 14px;
    text-overflow:ellipsis;color:var(--ink);}
  .breadcrumb {font-size:12px;letter-spacing:.015em;}
  .content-view {min-width:0;margin-top:31px;}
  .page-heading h1{font-weight:630;letter-spacing:-1.55px}
  .page-heading p{max-width:690px;line-height:1.75}

  /* Satin content glass: darker material behind text, lighter reflection on top. */
  .surface,.metric,.agents-list li,.call-history>li,.phone-card,
  .operator-row,.login-card,.billing-offers {
    border-color:color-mix(in srgb,var(--desktop-edge),var(--line) 30%);
    background:linear-gradient(145deg,
      color-mix(in srgb,var(--surface),white 6%) 0%,
      color-mix(in srgb,var(--surface),transparent 5%) 100%);
    box-shadow:var(--desktop-card-shadow),inset 0 1px 0 var(--desktop-reflection);
    -webkit-backdrop-filter:blur(21px) saturate(150%);
    backdrop-filter:blur(21px) saturate(150%);
  }
  :root[data-theme="dark"] .surface,
  :root[data-theme="dark"] .metric,
  :root[data-theme="dark"] .agents-list li,
  :root[data-theme="dark"] .call-history>li,
  :root[data-theme="dark"] .phone-card,
  :root[data-theme="dark"] .operator-row,
  :root[data-theme="dark"] .login-card,
  :root[data-theme="dark"] .billing-offers {
    background:linear-gradient(143deg,rgba(44,40,59,.79),rgba(32,30,44,.74));
  }
  .agents-list li,.call-history>li,.metric {
    transition:transform .36s var(--desktop-spring),box-shadow .35s ease,
      border-color .3s ease,background-color .3s ease;
  }
  .metric {border-radius:25px;}
  .metric>strong{font-weight:630;letter-spacing:-1.05px;}
  .agents-list li {border-radius:25px;position:relative;}
  .agents-list .agent-avatar {
    border:1px solid color-mix(in srgb,var(--desktop-edge),transparent 25%);
    box-shadow:inset 0 1px 0 var(--desktop-reflection),0 4px 13px rgba(56,40,89,.055);
  }
  .call-history>li {border-radius:23px;}
  .call-history summary{border-radius:12px}
  .call-history dl{border-top-color:color-mix(in srgb,var(--line),transparent 28%);}
  .history-toolbar,.studio-selection,.livekit-pilot,.livekit-live-panel,
  .privacy-details,.voice-transcript {
    border-color:color-mix(in srgb,var(--desktop-edge),var(--line) 27%);
    background:linear-gradient(152deg,
      color-mix(in srgb,var(--glass),white 13%),
      color-mix(in srgb,var(--glass),transparent 11%));
    -webkit-backdrop-filter:blur(28px) saturate(170%);
    backdrop-filter:blur(28px) saturate(170%);
    box-shadow:0 13px 37px rgba(52,36,90,.065),
      inset 0 1px 0 var(--desktop-reflection);
  }
  .studio-selection{border-radius:999px;min-height:46px;padding-inline:18px}
  .studio-selection select{font-weight:540}
  .studio-view{isolation:isolate;}
  .studio-intro h1{font-weight:590;letter-spacing:-1.7px;}
  .stage-orb {filter:drop-shadow(0 25px 60px color-mix(in srgb,var(--accent),transparent 89%));}
  .voice-controls{gap:15px;}
  .livekit-pilot{border-radius:25px;}
  .livekit-live-panel{border-radius:23px;}
  .livekit-live-bubble,.livekit-pilot-history-item .transcript-bubble{
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--desktop-reflection),transparent 15%);
  }
  .primary-button, .secondary-button,.actions button,
  .agent-actions button {
    transition:transform .27s var(--desktop-spring),box-shadow .28s ease,
      background .24s ease,border-color .24s ease;
  }
  .primary-button,.actions button {
    box-shadow:0 10px 25px rgba(45,34,71,.15),inset 0 1px 0 rgba(255,255,255,.20);
  }
  .secondary-button {
    background:linear-gradient(145deg,
      color-mix(in srgb,var(--glass),white 12%),
      color-mix(in srgb,var(--surface),transparent 8%));
    border-color:color-mix(in srgb,var(--desktop-edge),var(--line) 29%);
    box-shadow:inset 0 1px 0 var(--desktop-reflection),0 5px 14px rgba(45,34,71,.04);
  }
  .agent-dialog {
    border-color:color-mix(in srgb,var(--desktop-edge),var(--line) 20%);
    background:linear-gradient(148deg,
      color-mix(in srgb,var(--solid),transparent 3%),
      color-mix(in srgb,var(--surface),var(--solid) 42%));
    box-shadow:0 40px 115px rgba(31,22,56,.20),
      inset 0 1px 0 var(--desktop-reflection);
    -webkit-backdrop-filter:blur(35px) saturate(145%);
    backdrop-filter:blur(35px) saturate(145%);
  }
  :root[data-theme="dark"] .agent-dialog{
    background:linear-gradient(145deg,rgba(40,36,55,.96),rgba(29,28,41,.96));
  }
  .login-card{border-radius:30px;}
  .login-art>.brand .brand-mark{border-radius:14px}
  .login-theme{width:44px;height:44px;border-radius:15px;}

  @media (hover:hover) and (pointer:fine) {
    .sidebar .nav-item:hover:not(.active){transform:translateX(3px)}
    .sidebar .nav-item:hover svg{transform:scale(1.10);opacity:1}
    .agents-list li:hover,.call-history>li:hover,.metric:hover {
      transform:translateY(-3px);
      border-color:color-mix(in srgb,var(--accent),transparent 69%);
      box-shadow:0 25px 65px rgba(46,33,79,.12),inset 0 1px 0 var(--desktop-reflection);
    }
    .topbar .icon-button:hover,.secondary-button:hover:not(:disabled){
      transform:translateY(-1px);
      box-shadow:0 13px 30px rgba(48,34,84,.13),
        inset 0 1px 0 var(--desktop-reflection);
    }
    .primary-button:hover:not(:disabled),.actions button:hover:not(:disabled){
      transform:translateY(-1px);
      box-shadow:0 17px 34px rgba(48,34,84,.2),inset 0 1px 0 rgba(255,255,255,.24);
    }
    .sidebar .nav-item:active,
    .topbar .icon-button:active,
    .primary-button:active:not(:disabled),
    .secondary-button:active:not(:disabled){transform:scale(.975)}
  }
}

/* Improve mobile translucency without creating unreadable milky text panes. */
@media(max-width:720px){
  .sidebar nav,.mobile-menu {
    background:linear-gradient(145deg,
      color-mix(in srgb,var(--glass),white 9%),
      color-mix(in srgb,var(--glass),transparent 23%));
    border-color:color-mix(in srgb,var(--glass-border),transparent 2%);
    box-shadow:0 18px 55px rgba(49,37,84,.17),0 5px 15px rgba(49,37,84,.07),
      inset 0 1px 0 var(--ds-glass-shine),
      inset 1px 0 0 color-mix(in srgb,var(--ds-glass-shine),transparent 40%);
    -webkit-backdrop-filter:blur(38px) saturate(190%);
    backdrop-filter:blur(38px) saturate(190%);
  }
  .topbar .icon-button,.workspace-picker{
    background:linear-gradient(140deg,
      color-mix(in srgb,var(--glass),white 14%),
      color-mix(in srgb,var(--glass),transparent 20%));
    border-color:color-mix(in srgb,var(--glass-border),transparent 12%);
    box-shadow:inset 0 1px 0 var(--ds-glass-shine),
      0 6px 16px rgba(46,33,80,.045);
    -webkit-backdrop-filter:blur(25px) saturate(170%);
    backdrop-filter:blur(25px) saturate(170%);
  }
}
@media(prefers-reduced-motion:reduce){
  .sidebar .nav-item,.topbar .icon-button,.agents-list li,.call-history>li,.metric,
  .primary-button,.secondary-button,.actions button {
    transition:none!important;animation:none!important;transform:none!important;
  }
}
@media(prefers-reduced-transparency:reduce){
  .sidebar,.topbar .icon-button,.workspace-picker,
  .surface,.metric,.agents-list li,.call-history>li,
  .history-toolbar,.studio-selection,.livekit-pilot,.livekit-live-panel,
  .agent-dialog,.login-card,.billing-offers,.sidebar nav,.mobile-menu{
    background:var(--solid)!important;
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
}
@media(prefers-contrast:more){
  .sidebar,.topbar .icon-button,.workspace-picker,
  .surface,.metric,.agents-list li,.call-history>li,
  .agent-dialog,.login-card,.sidebar nav,.mobile-menu{
    background:var(--solid)!important;
    border-color:var(--line)!important;
  }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .sidebar,.topbar .icon-button,.workspace-picker,.surface,.metric,
  .agents-list li,.call-history>li,.agent-dialog,.sidebar nav,.mobile-menu{
    background:var(--solid)!important;
  }
}


/* Studio light & motion: a shared finish for mobile and desktop. */
:root{--studio-ease:cubic-bezier(.22,1,.36,1);--light-violet:#ac83f5;--light-blue:#8adce8;--light-pearl:#fff5ee}
:root[data-theme="dark"]{--light-violet:#aa83f9;--light-blue:#74cfdf;--light-pearl:#ded5ff}
.orb-shell{--orb-light-opacity:.28;--orb-light-speed:20s}
.orb-shell .orb-radiance{
 inset:4%;border-radius:50%;pointer-events:none;z-index:-1;
 background:radial-gradient(ellipse at 36% 38%,color-mix(in srgb,var(--light-blue),transparent 78%),transparent 57%),
 radial-gradient(ellipse at 66% 64%,color-mix(in srgb,var(--light-violet),transparent 64%),transparent 60%);
 filter:blur(25px);opacity:.36;transform:scale(1.08);
 transition:opacity .6s var(--studio-ease),transform .6s var(--studio-ease);
}
.orb-core .orb-light-flow{
 position:absolute;inset:-24%;border-radius:50%;pointer-events:none;
 background:radial-gradient(ellipse at 29% 40%,var(--light-blue),transparent 45%),
 radial-gradient(ellipse at 72% 60%,var(--light-violet),transparent 46%),
 radial-gradient(ellipse at 46% 76%,var(--light-pearl),transparent 40%);
 filter:blur(15px);opacity:var(--orb-light-opacity);
 transform:rotate(-18deg) scale(1.05);
 animation:studio-light-flow var(--orb-light-speed) ease-in-out infinite alternate;
 transition:opacity .32s ease-out;
}
@keyframes studio-light-flow{
 0%{transform:translate3d(-3%,2%,0) rotate(-18deg) scale(1.04)}
 50%{transform:translate3d(4%,-3%,0) rotate(24deg) scale(1.12)}
 100%{transform:translate3d(-1%,4%,0) rotate(65deg) scale(1.02)}
}
#studio .stage-orb .orb-shell{--orb-light-opacity:.32}
#studio.call-starting .orb-shell{--orb-light-opacity:.56;--orb-light-speed:9s}
#studio.call-starting .orb-radiance{opacity:.66;transform:scale(1.12)}
#studio[data-livekit-pilot="active"] .orb-shell{
 --orb-light-opacity:calc(.36 + var(--livekit-level,0)*.4);
}
#studio[data-livekit-pilot="active"] .orb-radiance{
 opacity:calc(.4 + var(--livekit-level,0)*.5);
 transform:scale(var(--livekit-aura-scale,1));
 transition:opacity .22s ease-out,transform .3s ease-out;
}
#studio[data-livekit-phase="agent"] .orb-shell,
#studio[data-livekit-phase="overlap"] .orb-shell{--orb-light-speed:11s}
#studio[data-livekit-phase="user"] .orb-light-flow,
#studio[data-livekit-phase="listening"] .orb-light-flow{
 background:radial-gradient(ellipse at 30% 40%,var(--light-blue),transparent 48%),
 radial-gradient(ellipse at 72% 68%,var(--light-violet),transparent 50%);
}
#studio[data-livekit-phase="thinking"] .orb-shell{--orb-light-opacity:.48;--orb-light-speed:16s}
#studio[data-livekit-phase="thinking"] .orb-light-flow{
 background:radial-gradient(ellipse at 38% 40%,var(--light-pearl),transparent 44%),
 radial-gradient(ellipse at 67% 65%,var(--light-violet),transparent 52%);
}
#studio[data-livekit-phase="muted"] .orb-shell{--orb-light-opacity:.12}
#studio[data-livekit-phase="muted"] .orb-radiance{opacity:.16;filter:blur(25px) saturate(.35)}
#studio[data-livekit-pilot="active"] .stage-orb .orb-halo{
 animation:none;filter:blur(22px);
 opacity:var(--livekit-halo-opacity,.38);transform:scale(var(--livekit-aura-scale,1));
}
#studio[data-livekit-intensity="calm"] .orb-shell{--orb-light-speed:28s;--orb-light-opacity:calc(.28 + var(--livekit-level,0)*.18)}
/* WebKit needs a real clip for filtered, animated children; rounded overflow
   alone can expose their rectangular compositing surface on iOS. */
.orb-shell .orb-core{
 isolation:isolate;clip-path:circle(50% at 50% 50%);
 -webkit-mask-image:radial-gradient(circle,white 99%,transparent 100%);
 mask-image:radial-gradient(circle,white 99%,transparent 100%);
}
:root[data-theme="dark"] .orb-light-flow{mix-blend-mode:normal}
:root[data-theme="dark"] .orb-shell .orb-canvas{mix-blend-mode:normal}
:root[data-theme="dark"] .orb-radiance{opacity:.5}
:root[data-theme="dark"] #studio[data-livekit-pilot="active"] .orb-radiance{opacity:calc(.45 + var(--livekit-level,0)*.45)}

/* One glass selection travels between destinations, rather than flashing. */
.sidebar nav.has-liquid-indicator{isolation:isolate}
.nav-liquid-indicator{
 position:absolute;left:0;top:0;z-index:-1;pointer-events:none;border-radius:17px;
 transform:translate3d(var(--nav-x,0px),var(--nav-y,0px),0);
 background:linear-gradient(135deg,color-mix(in srgb,var(--soft),white 12%),color-mix(in srgb,var(--soft),transparent 18%));
 border:1px solid color-mix(in srgb,var(--glass-border),transparent 20%);
 box-shadow:inset 0 1px 0 #ffffff38,0 4px 16px #30234b08;
}
.nav-liquid-indicator.is-positioned{
 transition:transform .44s var(--studio-ease),width .44s var(--studio-ease),height .44s var(--studio-ease),background .25s;
}
.sidebar nav.has-liquid-indicator .nav-item.active,
.sidebar nav.has-liquid-indicator #mobile-more.active,
.sidebar nav.has-liquid-indicator #mobile-more[aria-expanded="true"]{
 background:transparent;box-shadow:none;border-color:transparent;
}
.sidebar nav.has-liquid-indicator .nav-item.active::before{display:none}
@media(min-width:721px){.sidebar nav.has-liquid-indicator{position:relative}}
@media(max-width:720px){.nav-liquid-indicator{border-radius:19px}}

/* Route fades use opacity on the real surface, never snapshot resizing. */
#tenant-details{view-transition-name:none}

.primary-button,.secondary-button,.icon-button,.ds-select-trigger{
 transition:transform .26s var(--studio-ease),background .22s,border-color .22s,box-shadow .26s;
}
.primary-button:active:not(:disabled),.secondary-button:active:not(:disabled),.icon-button:active:not(:disabled){transform:scale(.985)}
#studio .start-button{box-shadow:0 8px 25px color-mix(in srgb,var(--accent),transparent 86%),inset 0 1px 0 #ffffff2b}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 #studio .start-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 12px 32px color-mix(in srgb,var(--accent),transparent 78%),inset 0 1px 0 #ffffff35}
 #studio .start-button:active:not(:disabled){transform:translateY(0) scale(.97)}
}
/* Native dialogs keep native focus trapping; modern engines also animate exit. */
@supports (transition-behavior:allow-discrete){
 dialog.agent-dialog,dialog.document-preview{
  opacity:0;transform:none;
  transition:opacity .2s ease-out,transform .25s var(--studio-ease),display .25s allow-discrete,overlay .25s allow-discrete;
 }
 dialog.agent-dialog[open],dialog.document-preview[open]{opacity:1;transform:none}
 dialog::backdrop{
  opacity:0;transition:opacity .25s ease-out,display .25s allow-discrete,overlay .25s allow-discrete;
 }
 dialog[open]::backdrop{opacity:1}
 @starting-style{dialog[open]::backdrop{opacity:0}}
}
.agent-step:not([hidden]){animation:studio-step-in .3s var(--studio-ease) both}
@keyframes studio-step-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-transparency:reduce){
 .nav-liquid-indicator{background:var(--solid)}
 .orb-light-flow,.orb-radiance{display:none}
}
@media(prefers-reduced-motion:reduce){
 .nav-liquid-indicator,.orb-light-flow,.orb-radiance,.agent-step,
 dialog.agent-dialog,dialog.document-preview{animation:none!important;transition:none!important}
 ::view-transition-group(studio-page),::view-transition-old(studio-page),::view-transition-new(studio-page){animation:none!important}
 #studio .start-button:hover:not(:disabled){transform:none}
}

/* Quiet light: the orb illuminates its space without moving the layout. */
#studio{position:relative;isolation:isolate}
#studio .stage-orb::before{
 content:'';position:absolute;inset:-20% 0 -20%;z-index:-1;pointer-events:none;
 background:radial-gradient(ellipse at 50% 46%,color-mix(in srgb,var(--light-violet),transparent 89%),transparent 64%),
 radial-gradient(ellipse at 39% 40%,color-mix(in srgb,var(--light-blue),transparent 94%),transparent 57%);
 opacity:.3;transition:opacity .7s ease;
}
#studio.call-starting .stage-orb::before{opacity:.5}
#studio[data-livekit-pilot="active"] .stage-orb::before{opacity:calc(.42 + var(--livekit-level,0)*.2)}
#studio[data-livekit-phase="muted"] .stage-orb::before{opacity:.22}
#studio .studio-intro,#studio .studio-selection{transition:opacity .55s ease}
#studio .stage-orb{isolation:isolate;transition:transform .65s var(--studio-ease)}
#studio.call-starting .studio-intro,#studio[data-livekit-pilot="active"] .studio-intro{opacity:.78}
#studio.call-starting .studio-selection,#studio[data-livekit-pilot="active"] .studio-selection{opacity:.86}
#studio.call-starting .stage-orb,#studio[data-livekit-pilot="active"] .stage-orb{transform:scale(1.035)}
#studio.call-starting .orb-core,#studio.call-starting .orb-orbit{animation:none}
#studio .voice-controls{transition:opacity .4s ease}
#studio[data-livekit-pilot="active"] .call-actions{animation:studio-controls-arrive .4s ease both}
@keyframes studio-controls-arrive{from{opacity:.55}to{opacity:1}}
#studio.call-starting .orb-shell{--orb-light-opacity:.42;--orb-light-speed:18s}
#studio[data-livekit-phase="agent"] .orb-shell,
#studio[data-livekit-phase="overlap"] .orb-shell{--orb-light-speed:18s}
#studio.call-starting .orb-radiance{opacity:.5;transform:scale(1.08)}
.login-card,.studio-selection,.sidebar nav,.ds-select-trigger{
 border-top-color:color-mix(in srgb,var(--glass-border),white 16%);
 border-bottom-color:color-mix(in srgb,var(--line),transparent 15%);
}
#studio[data-livekit-pilot="active"] .studio-selection{
 border-top-color:color-mix(in srgb,var(--light-violet),var(--glass-border) 78%);
}
.login-intro h1,.studio-intro h1,.page-heading h1{text-wrap:balance}
.login-intro p,.studio-intro p{line-height:1.65;letter-spacing:.01em}
.nav-liquid-indicator.is-positioned{transition-duration:.32s}
@media(max-width:720px){
 .agent-step:not([hidden]){animation:studio-controls-arrive .2s ease both}
}
@media(prefers-reduced-transparency:reduce){#studio .stage-orb::before{display:none}}
@media(prefers-reduced-motion:reduce){
 #studio .stage-orb::before,#studio .studio-intro,#studio .studio-selection,#studio .stage-orb,
 #studio .voice-controls,#studio .call-actions{transition:none!important;animation:none!important}
 #studio .stage-orb{transform:none!important}
}

/* Reserve the complete ornament, rather than centering an oversized orb in
   a shorter fixed-height row. Keep a separate slot for its live status. */
#studio .stage-orb,
#studio[data-voice-transport="livekit"] .stage-orb{
 height:auto;min-height:0;flex:none;margin:0;padding:18px 0 38px;
}
#studio .stage-orb .orb-shell{
 width:clamp(230px,70vw,340px);height:auto;aspect-ratio:1;
}
#studio .studio-selection{flex:none;max-width:min(300px,100%);margin-bottom:20px}
#studio .studio-intro{max-width:100%;min-width:0}
#studio .voice-controls{min-width:0;gap:16px}
#studio .call-actions{max-width:100%;gap:12px}
.call-actions button,.agent-actions button,.actions button{
 max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.45;
}
.page-heading{gap:20px;margin-bottom:24px}
.page-heading>div,.agent-summary>*,.phone-detail-grid>*,.phone-resource-grid>*{min-width:0}
.page-heading h1,.login-card h2,.agents-list strong,.phone-card h3{
 max-width:100%;overflow-wrap:anywhere;hyphens:auto;line-height:1.25;
}
.agents-list small,.phone-card p,.phone-resource p,.call-history dd,
.phone-facts dd,.agent-summary dd,.connection-label,.message{
 min-width:0;overflow-wrap:anywhere;
}
.agent-actions{flex-wrap:wrap;gap:10px}
.agent-dialog label,.login-card label{line-height:1.5}
.login-orb{height:auto;margin-top:10px;padding:10px 0 4px}
.login-orb .orb-shell{width:clamp(200px,52vw,340px);height:auto;aspect-ratio:1}
@media(max-width:720px){
 #studio .stage-orb .orb-shell{width:min(70vw,300px)}
 #studio .studio-selection{margin-bottom:18px}
 #studio[data-voice-transport="livekit"] .studio-selection{margin-bottom:8px}
 .login-orb .orb-shell{width:min(56vw,230px)}
 .page-heading{gap:16px;margin-bottom:24px}
 .page-heading h1{margin-block:10px 8px}
 .login-card h2{margin-block:14px}
 .login-card #login-description{line-height:1.65}
 .studio-extras{column-gap:12px;row-gap:8px}
 .studio-extras summary{white-space:normal;text-align:center;line-height:1.5}
}

/* Shared finish: pearl edges, consistent controls and deliberate spacing.
   Glass belongs to a surface, never an extra overlay over interactive content. */
:root{
 --finish-radius:16px;
 --finish-edge:color-mix(in srgb,var(--glass-border),var(--line) 38%);
 --finish-shine:rgba(255,255,255,.65);
 --finish-shadow:0 8px 22px rgba(44,32,72,.055);
 --finish-control:linear-gradient(145deg,color-mix(in srgb,var(--glass),white 12%),var(--surface));
}
:root[data-theme="dark"]{
 --finish-shine:rgba(255,255,255,.15);
 --finish-shadow:0 8px 24px rgba(0,0,0,.14);
 --finish-control:linear-gradient(145deg,rgba(64,55,79,.68),rgba(36,32,48,.76));
}
.primary-button,.secondary-button,.actions button,.agent-actions .text-button{
 min-height:46px;border-radius:var(--finish-radius);
 font-weight:550;letter-spacing:-.012em;
}
.primary-button:not(.stop-button){
 background:linear-gradient(140deg,color-mix(in srgb,var(--button),var(--accent) 12%),var(--button));
 border-color:color-mix(in srgb,var(--button),var(--button-text) 14%);
 box-shadow:0 7px 19px color-mix(in srgb,var(--button),transparent 88%),inset 0 1px 0 #ffffff2b;
}
.secondary-button,.agent-actions .text-button,.export-actions.actions button,
#billing-portal{
 background:var(--finish-control);border:1px solid var(--finish-edge);
 box-shadow:inset 0 1px 0 var(--finish-shine),var(--finish-shadow);
 color:var(--secondary);
}
#billing-portal{
 min-height:46px;border-radius:var(--finish-radius);padding:11px 16px;
 font:550 13px Inter,sans-serif;max-width:100%;
}
.agent-actions .text-button{padding:10px 16px}
.agent-actions{gap:10px;padding-top:18px}
.icon-button{border:1px solid var(--finish-edge)}
input:not([type="checkbox"]):not([type="radio"]),textarea{
 border-radius:var(--finish-radius);
 border-color:color-mix(in srgb,var(--line),var(--glass-border) 18%);
 background:color-mix(in srgb,var(--solid),var(--glass) 15%);
 box-shadow:inset 0 1px 2px color-mix(in srgb,var(--ink),transparent 97%);
 transition:border-color .2s ease,box-shadow .2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,textarea:focus{
 border-color:color-mix(in srgb,var(--accent),var(--line) 35%);
 box-shadow:0 0 0 4px color-mix(in srgb,var(--accent),transparent 92%);
}
.page-heading>div{max-width:100%}
.page-heading p{max-width:52ch;text-wrap:pretty}
.page-heading .eyebrow{letter-spacing:.16em}
.metric>strong,.connection-label,.call-result{font-variant-numeric:tabular-nums}
.metric>span{letter-spacing:.025em}
.empty-state>svg{width:28px;height:28px;color:var(--accent);margin-bottom:12px}
.empty-state h2{line-height:1.35}
.empty-state p{margin-top:12px}
.agent-dialog-header{gap:16px}
.agent-dialog-header .eyebrow{line-height:1.6;max-width:calc(100% - 60px)}
.agent-dialog-header>.icon-button{flex:none;width:44px;height:44px;min-width:44px}
.wizard-footer{gap:16px}
.wizard-footer .primary-button{min-height:48px}
.login-card .primary-button{min-height:52px}

/* Keep the hero present in both transports; the call grows inside its own slot. */
#studio .studio-intro h1{line-height:1.13;letter-spacing:-.045em}
#studio .studio-intro h1>span{
 color:var(--accent);
 background:linear-gradient(110deg,var(--accent) 8%,color-mix(in srgb,var(--accent),var(--ink) 38%) 85%);
 -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
#studio .studio-intro p{font-size:12px;margin-top:14px;color:var(--secondary)}
#studio .studio-selection{margin-bottom:24px}
#studio .call-actions{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(100%,360px);
 grid-template-rows:minmax(54px,auto) minmax(44px,auto);align-items:stretch;
}
#studio .call-actions>.start-button,#studio .call-actions>#voice-reconcile{
 grid-column:1/-1;justify-self:center;
}
#studio .call-actions>.start-button{
 min-width:min(100%,232px);min-height:54px;padding:14px 28px;
 border-radius:999px;gap:12px;font-size:13px;line-height:1.5;
}
#studio .start-button::before{
 content:'';width:18px;height:18px;flex:none;border-radius:4px;
 background:
  linear-gradient(currentColor,currentColor) 0 50%/2px 6px,
  linear-gradient(currentColor,currentColor) 4px 50%/2px 12px,
  linear-gradient(currentColor,currentColor) 8px 50%/2px 18px,
  linear-gradient(currentColor,currentColor) 12px 50%/2px 10px,
  linear-gradient(currentColor,currentColor) 16px 50%/2px 5px;
 background-repeat:no-repeat;opacity:.85;
}
#studio .start-button.stop-button{
 background:linear-gradient(145deg,#aa4c67,#8b3c54);color:#fff;border-color:#ffffff26;
 box-shadow:0 8px 24px #8b3c541f,inset 0 1px 0 #ffffff2b;
}
#studio .start-button.stop-button::before{
 width:12px;height:12px;margin:3px;background:currentColor;border-radius:3px;
}
#studio .call-actions>.text-button{
 min-height:44px;padding:10px 14px;line-height:1.4;
 background:var(--finish-control);border-color:var(--finish-edge);
 box-shadow:inset 0 1px 0 var(--finish-shine);
}
#studio .call-actions>#voice-mute{grid-column:1/-1;justify-self:center}
#studio .call-actions:has(#voice-resume:not([hidden]))>#voice-mute{
 grid-column:auto;justify-self:stretch;
}
#studio .call-actions>.text-button[aria-pressed="true"]{
 background:var(--soft);border-color:color-mix(in srgb,var(--accent),transparent 55%);color:var(--accent);
}
#studio .connection-label{min-height:20px;max-width:40ch}
#studio .studio-extras{row-gap:10px;column-gap:16px}
#studio .studio-extras summary{min-height:40px;font-size:11px}
#studio .studio-extras details:not([open]){box-shadow:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.orb-arrival{
 inset:13%;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent),transparent 25%);
 box-shadow:inset 0 0 16px color-mix(in srgb,var(--accent),transparent 94%);
 opacity:0;pointer-events:none;
}
.livekit-live-header-actions{flex-wrap:wrap;gap:8px}
.livekit-live-header-actions .text-button{
 min-height:44px;padding:10px 14px;border:1px solid var(--finish-edge);
 border-radius:var(--finish-radius);background:var(--finish-control);line-height:1.45;
}
@media(hover:hover) and (pointer:fine){
 .secondary-button:hover:not(:disabled),.agent-actions .text-button:hover:not(:disabled),
 #billing-portal:hover:not(:disabled){
  border-color:color-mix(in srgb,var(--accent),var(--line) 64%);
  color:var(--ink);box-shadow:inset 0 1px 0 var(--finish-shine),0 9px 24px color-mix(in srgb,var(--accent),transparent 90%);
 }
 .agents-list li:hover,.call-history>li:hover,.metric:hover{transform:translateY(-1px)}
 .sidebar .nav-item:hover:not(.active){transform:none}
}
@media(min-width:721px){
 #studio .studio-intro h1{font-size:clamp(38px,3.3vw,52px)}
 #studio .stage-orb .orb-shell{width:clamp(280px,29vw,370px)}
 .content-view{padding-bottom:64px}
 .page-heading{margin-bottom:32px}
}
@media(max-width:720px){
 #studio{padding-top:22px}
 #studio .studio-intro h1{font-size:clamp(30px,8vw,38px)}
 #studio .studio-intro p{font-size:11px;margin-top:10px}
 #studio .studio-selection,#studio[data-voice-transport="livekit"] .studio-selection{margin-bottom:22px}
 #studio .stage-orb .orb-shell{width:min(65vw,270px)}
 #studio .stage-orb,#studio[data-voice-transport="livekit"] .stage-orb{padding:10px 0 30px}
 #studio .voice-controls{gap:12px}
 #studio .call-actions>.start-button{min-height:52px}
 .page-heading>.primary-button,.page-heading>.secondary-button{border-radius:var(--finish-radius);min-height:46px}
 .agent-actions .text-button{flex:1 1 auto;min-height:44px}
 .livekit-live-header-actions{width:100%}
 .livekit-live-header-actions .text-button{flex:1 1 120px}
}
@media(max-width:720px) and (max-height:740px){
 #studio .studio-intro h1{font-size:28px}
 #studio .stage-orb .orb-shell{width:min(60vw,220px)}
 #studio .studio-selection,#studio[data-voice-transport="livekit"] .studio-selection{margin-bottom:16px}
}
@media(prefers-reduced-motion:reduce){
 .orb-arrival{display:none}
 input,textarea{transition:none}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
 :root{--finish-control:var(--solid)}
 #studio .studio-intro h1>span{background:none;-webkit-text-fill-color:currentColor}
}
@media(forced-colors:active){
 #studio .studio-intro h1>span{background:none;-webkit-text-fill-color:CanvasText}
 #studio .start-button::before{display:none}
 .orb-arrival{display:none}
}

