/* Chat-first workspace drawer override */
:root{
  --shell-edge:14px;
  --workspace-width:292px;
  --workspace-gap:18px;
}

.app{
  grid-template-columns:minmax(0,1fr);
  grid-template-areas:
    "nav"
    "main";
  max-width:none;
  gap:4px;
  padding:8px var(--shell-edge) 14px;
  transition:padding-left .22s ease;
}

nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  margin:0;
  top:6px;
  min-height:34px;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  transition:padding-left .22s ease;
}

.ns{
  margin-left:auto;
  gap:10px;
}

.nb{
  gap:10px;
}

.bn{
  display:none;
}

nav::after{
  display:none;
}

.sigil{
  width:34px;
  height:34px;
  border-radius:11px;
}

.sigl{
  font-size:22px;
}

.main{
  width:100%;
  margin:0;
  gap:4px;
  transition:margin-left .22s ease,width .22s ease;
}

.workspace-pill{
  display:flex;
  padding-inline:10px 12px;
}

body.workspace-open .workspace-pill{
  background:#ffffff;
  border-color:var(--line-strong);
}

.pill-icon,
.user-badge{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  line-height:1;
}

.user-badge{
  width:18px;
  height:18px;
  border-radius:999px;
  background:#eef2f7;
  color:#475569;
  font-size:10px;
  font-weight:600;
}

.pill{
  min-height:32px;
  padding:6px 9px;
  gap:6px;
  border-radius:999px;
  font-size:10px;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
}

.workspace-pill,
.status-pill,
.account-pill,
#apill{
  height:32px;
}

.workspace-pill{
  padding-inline:9px 11px;
}

.status-pill,
#opill{
  width:32px;
  min-width:32px;
  padding:0;
  justify-content:center;
}

.status-pill span{
  display:none;
}

.status-pill .status-dot{
  margin:0;
}

.account-pill.signed-in .user-badge{
  background:#d9f1eb;
  color:#0f766e;
}

.account-pill{
  padding-inline:8px 10px;
}

.account-pill span{
  display:block;
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-pill.guest .user-badge{
  display:none;
}

.account-pill.guest{
  padding-inline:12px;
}

.workspace-scrim{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.18);
  backdrop-filter:blur(4px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:55;
  display:none;
}

.shell-rail{
  position:fixed;
  top:18px;
  left:var(--shell-edge);
  bottom:14px;
  width:min(var(--workspace-width),calc(100vw - 40px));
  z-index:56;
  transform:translateX(calc(-100% - 24px));
  transition:transform .22s ease;
}

body.workspace-open .workspace-scrim{
  opacity:1;
  pointer-events:auto;
}

body.workspace-open .shell-rail{
  transform:translateX(0);
}

body.workspace-open .main{
  margin-left:calc(var(--workspace-width) + var(--workspace-gap));
  width:calc(100% - var(--workspace-width) - var(--workspace-gap));
}

.rail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:2px;
}

.rail-close{
  width:32px;
  height:32px;
  border:none;
  border-radius:12px;
  background:#f3f4f6;
  color:var(--ink-soft);
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.shell-rail > .rail-group:not(:first-of-type):not(.rail-mode-card),
.rail-presence{
  display:flex;
}

.shell-rail > .rail-group:not(:first-of-type){
  margin-top:4px;
}

.section-bar{
  padding-top:0;
  align-items:center;
}

.section-bar h1{
  margin-top:0;
}

body[data-section="chat"] .section-bar{
  display:none;
}

.cf{
  padding:0 0 6px;
}

.rail-tab-copy{
  gap:0;
}

.starter{
  min-height:auto;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:auto;
  padding:0 12px 12px;
  text-align:center;
}

.starter h1{
  max-width:none;
  font-size:clamp(28px,3.4vw,40px);
  line-height:1.08;
  letter-spacing:-.04em;
  white-space:nowrap;
}

#p-chat .cb{
  padding-top:0;
}

#p-chat .chat-approvals{
  margin-top:2px;
}

#p-screen .sp,
#p-tasks .tp,
#p-comm .cp,
#p-settings .cp{
  padding-top:14px;
}

#p-screen .work-head,
#p-tasks .work-head,
#p-comm .comm-top,
#p-settings > .cp > .settings-shell > .section-card:first-child{
  margin-top:0;
}

.section-bar,
.starter-mark{
  transition:opacity .22s ease,transform .22s ease;
}

.ctt,
.metric-sub{
  display:none;
}

.comm-title{
  font-size:26px;
}

.work-head .comm-head,
.settings-shell .comm-head,
.comm-top .comm-head{
  align-items:center;
}

.work-stats,
.comm-metrics{
  gap:10px;
}

.work-stat,
.metric-card{
  padding:12px;
}

.section-head{
  margin-bottom:10px;
}

.nav-condensed nav{
  width:100%;
  max-width:none;
  min-height:34px;
  margin:0;
  padding:0;
  border-radius:0;
  box-shadow:none;
}

.nav-condensed .bt{
  opacity:0;
  transform:translateX(-8px);
  width:0;
  overflow:hidden;
}

.nav-condensed .pill{
  min-width:30px;
  width:30px;
  height:30px;
  padding:0;
  justify-content:center;
  border-radius:999px;
}

.nav-condensed .pill span{
  opacity:0;
  width:0;
  overflow:hidden;
}

.nav-condensed .workspace-pill,
.nav-condensed #apill,
.nav-condensed .account-pill,
.nav-condensed .status-pill{
  gap:0;
}

.nav-condensed .workspace-pill{
  margin-right:2px;
}

.nav-condensed .account-pill .user-badge{
  display:grid;
}

.nav-condensed .account-pill.guest .user-badge{
  position:relative;
  display:grid;
  background:#ffffff;
  border:1px solid rgba(15,23,42,.08);
  font-size:0;
  color:transparent;
}

.nav-condensed .account-pill.guest .user-badge::before{
  content:'';
  position:absolute;
  top:4px;
  left:50%;
  width:6px;
  height:6px;
  margin-left:-3px;
  border-radius:50%;
  background:#64748b;
}

.nav-condensed .account-pill.guest .user-badge::after{
  content:'';
  position:absolute;
  left:50%;
  bottom:4px;
  width:11px;
  height:6px;
  margin-left:-5.5px;
  border-radius:6px 6px 4px 4px;
  border:1.5px solid #64748b;
  border-top:none;
}

.nav-condensed .status-pill{
  width:10px;
  min-width:10px;
  background:transparent;
  border:none;
  box-shadow:none;
}

.nav-condensed .status-pill .status-dot{
  width:7px;
  height:7px;
}

.nav-condensed .section-bar{
  opacity:.92;
}

.nav-condensed .main{
  padding-top:2px;
}

@media (max-width:980px){
  .app{
    padding-left:12px;
  }

  nav{
    width:100%;
  }

  .main{
    width:100%;
    margin-left:0;
  }

  .workspace-scrim{
    display:block;
  }

  .shell-rail{
    top:8px;
    left:12px;
    bottom:12px;
    width:min(320px,calc(100vw - 24px));
  }

  body.workspace-open .main{
    margin-left:0;
    width:100%;
  }

  .section-bar{
    flex-direction:column;
    align-items:flex-start;
  }

  .nav-condensed nav{
    max-width:none;
    margin:0;
  }
}

@media (max-width:640px){
  .app{
    padding-inline:10px;
  }

  nav{
    width:100%;
  }

  .workspace-pill,
  .account-pill{
    flex:1;
    justify-content:center;
  }

  .status-pill{
    flex:0 0 32px;
  }
}

