/* Shared workspace navigation for standalone pages. */
body.has-workspace-rail { padding-left: 292px; transition: padding-left .3s cubic-bezier(.4, 0, .2, 1); }
.ws-rail {
  position: fixed; inset: 0 auto 0 0; z-index: 900; width: 292px;
  display: flex; flex-direction: column; gap: 18px; padding: 20px 12px 18px;
  background: #0b0c0e; border-right: 1px solid rgba(255,255,255,.09);
  overflow-y: auto; font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
}
.ws-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; }
.ws-rail-head-actions { display: flex; align-items: center; gap: 2px; }
.ws-lang-mini {
  display: inline-flex; padding: 2px; border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px; background: transparent;
}
.ws-lang-mini button {
  min-width: 26px; height: 25px; border: 0; border-radius: 6px;
  background: transparent; color: #9298a4; font: inherit; font-size: 9.5px;
  font-weight: 500; cursor: pointer;
}
.ws-lang-mini button[aria-pressed="true"] { background: #f2f3f5; color: #08090b; }
.ws-lang-mini button:hover { color: #f2f3f5; }
.ws-rail-search {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: #9298a4; cursor: pointer;
}
.ws-rail-search:hover { background: rgba(255,255,255,.06); color: #f5f6f8; }
.ws-rail-brand {
  display: flex; align-items: flex-start; gap: 2px; padding: 0;
  color: #f5f6f8; text-decoration: none; font-size: 21px; font-weight: 500; letter-spacing: -.06em;
}
.ws-rail-brand span { font-weight: 300; }
.ws-rail-brand .ws-rail-ai { font-size: 9px; letter-spacing: .04em; font-weight: 700; color: #9298a4; margin: 1px 0 0 3px; }
.ws-rail-nav { display: flex; flex-direction: column; gap: 2px; }
.ws-rail-nav a {
  display: flex; align-items: center; min-height: 38px; padding: 0 10px;
  border-radius: var(--n-radius-row, 10px);
  /* The standalone rail is always dark; do not inherit theme text tokens. */
  color: #f2f3f5; text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.ws-rail-nav a:hover { background: rgba(255,255,255,.06); color: #ffffff; }
.ws-rail-nav a.is-active { background: rgba(255,255,255,.09); color: #ffffff; }
body.has-workspace-rail .btn-back-chat,
body.has-workspace-rail .em-back { display: none !important; }
body.training-page.has-workspace-rail .ud-container { width: min(1760px, calc(100vw - 292px - 64px)); }
@media (max-width: 820px) {
  body.has-workspace-rail { padding-left: 0; }
  .ws-rail { display: none; }
  body.has-workspace-rail .btn-back-chat,
  body.has-workspace-rail .em-back { display: inline-flex !important; }
  body.training-page.has-workspace-rail .ud-container { width: calc(100vw - 32px); }
}

.ws-mobile-menu { display: none; }
@media (max-width: 820px) {
  .ws-mobile-menu {
    display: block; position: fixed; left: 14px; bottom: max(14px, var(--sab, 0px)); z-index: 1200;
  }
  .ws-mobile-menu > summary {
    list-style: none; cursor: pointer; padding: 10px 14px; border-radius: 999px;
    background: #14161b; border: 1px solid rgba(255,255,255,.14);
    color: #f2f3f5; font-size: 12px; font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
  }
  .ws-mobile-menu > summary::-webkit-details-marker { display: none; }
  .ws-mobile-menu[open] > summary { background: #1c1e24; }
  .ws-mobile-menu nav {
    position: absolute; left: 0; bottom: calc(100% + 8px); width: 210px;
    max-height: 70vh; overflow-y: auto; padding: 7px;
    background: #14161b; border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
    display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0,0,0,.55);
  }
  .ws-mobile-menu nav a { padding: 9px 10px; border-radius: 7px; color: #c8ccd4; font-size: 12px; }
  .ws-mobile-menu nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
}
.ws-rail-nav a { gap: 10px; }
.ws-rail-nav a svg { flex: 0 0 18px; width: 18px; height: 18px; opacity: .8; color: #9298a4; }
.ws-rail-nav a.is-active svg { opacity: 1; color: #f5f6f8; }

.ws-usage {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  padding: 10px 10px 9px;
}
.ws-usage-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px; color: #9298a4; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .09em;
}
.ws-usage-head a { color: #9298a4; text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 10px; }
.ws-usage-head a:hover { color: #f5f6f8; }
.ws-usage-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 12px; color: #c8ccd4; }
.ws-usage-row strong { color: #f2f3f5; font-weight: 600; }
.ws-usage-pills { display: flex; gap: 5px; margin-top: 7px; }
.ws-usage-pills span {
  padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.07);
  color: #d4d6db; font-size: 9.5px; white-space: nowrap;
}
.ws-recents { flex: 0 0 auto; min-height: 0; }
.ws-recents-head {
  color: #9298a4; font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em;
  padding: 0 8px 6px;
}
.ws-recents-list { display: flex; flex-direction: column; gap: 1px; }
.ws-recents-list a {
  display: block; padding: 7px 8px; border-radius: 8px; color: #d4d6db;
  text-decoration: none; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-recents-list a:hover { background: rgba(255,255,255,.06); color: #f5f6f8; }
.ws-recents-empty { display: block; padding: 7px 8px; color: #747a86; font-size: 11.5px; }

.ws-rail-hide {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #9298a4; cursor: pointer;
}
.ws-rail-hide:hover { background: rgba(255,255,255,.06); color: #f5f6f8; }
.ws-rail-show {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 1300;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: #14161b; color: #f2f3f5; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.ws-rail-show:hover { background: #1f2127; }
.ws-rail-hide:focus-visible,
.ws-rail-show:focus-visible { outline: 2px solid #f5f6f8; outline-offset: 2px; }
body.ws-rail-collapsed { padding-left: 0 !important; }
body.ws-rail-collapsed .ws-rail { transform: translateX(-105%); pointer-events: none; }
body.ws-rail-collapsed .ws-rail-show { display: flex; }
.ws-rail { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
@media (max-width: 820px) {
  .ws-rail-hide { display: none; }
  .ws-rail-show { display: none !important; }
}
