/* The workspace switcher in the top bar (s1-workspaces.js): the mark, one tab per workspace (the current one marked), and a click-to-open list that takes over on a phone
 * and from five workspaces on. It sits first in the breadcrumb row, so the top bar costs no height. */
.crumb .wshome, .crumb .wst, .crumb .wsmenu { flex: none; }
.crumb .wshome { display: none; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--s1-ink, var(--ink)); }
.crumb .wshome:hover { background: var(--s1-hover, rgba(127,127,127,.12)); }
.crumb .wst { display: flex; align-items: center; gap: 4px; }
.crumb .wsti { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; font: 650 var(--s1-fs-2, 13px)/1 var(--ui, system-ui); color: var(--s1-mute, var(--mute)); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.crumb .wsti:hover { color: var(--s1-ink, var(--ink)); background: var(--s1-hover, rgba(127,127,127,.10)); }
.crumb .wsti.on { color: var(--s1-ink, var(--ink)); background: var(--well, rgba(127,127,127,.14)); }
.crumb .wsmenu { display: none; }
.crumb .wsmenu.many { display: inline-flex; }
.crumb .wsmb { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--s1-ink, var(--ink)); font: 650 var(--s1-fs-2, 13px)/1 var(--ui, system-ui); cursor: pointer; max-width: 240px; }
.crumb .wsmb:hover { background: var(--s1-hover, rgba(127,127,127,.12)); }
.crumb .wsma { display: none; }
.crumb .wsmc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.crumb .wsmenu.many .wsma { display: inline; color: var(--s1-mute, var(--mute)); }
.wspop { min-width: 240px; max-width: min(320px, calc(100vw - 24px)); }
.wspop .wsrows { max-height: 50vh; overflow-y: auto; } /* a long list scrolls inside its own menu, never the page */
.wspop .wsfind { padding: 4px 8px 6px; } .wspop .wsfind input { width: 100%; box-sizing: border-box; height: 32px; }
.wspop .mi[hidden] { display: none; }
@media (max-width: 660px) {
  .crumb { overflow: visible; }
  .crumb .wspop { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; max-width: none; }
  .crumb .wshome { display: inline-grid; }
  .crumb .wst { display: none; }
  .crumb .wsmenu, .crumb .wsmenu.many { display: inline-flex; min-width: 0; }
  .crumb .wsmc, .crumb .wsmenu.many .wsmc { display: inline; }
  .crumb .wsmenu.many .wsma { display: none; }
}
.crumb > .anchor.wsmenu { min-width: 0; flex: none; }

/* ---- The top bar's two rows (desktop). Row 1: workspaces, where you are, search, New, Ask Apex, Inbox, you. Row 2: the key places as plain links, and one quiet line of counts.
 * Both rows have fixed heights and the same side padding, so nothing crowds and nothing shifts. ---- */
@media (min-width: 661px) {
  :root { --s1-tb-h: 80px; }
  .tb { height: auto; flex-wrap: wrap; row-gap: 0; column-gap: 12px; padding-right: 22px; }
  .tb > .crumb { min-height: 54px; }
  .crumb .wst { margin-left: -12px; }
  .tb > .srch { margin-block: 0; }
  .tb > .tbn { order: 9; flex: 0 0 100%; display: flex; align-items: stretch; justify-content: space-between; gap: 24px; min-height: 26px; margin-inline: 0; }
  .tbq { margin: 0; align-self: center; font: 500 var(--s1-fs-1, 12px)/1.2 var(--ui, system-ui); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  /* Inbox keeps its word but not a loud dark count: a plain number beside it. */
  .tb .btn.icon.lb > .cnt { background: none; color: var(--mute); box-shadow: none; padding: 0; min-width: 0; height: auto; font-weight: 600; }
  .tb .btn.icon.lb > .cnt::before { content: none; }
}
@media (max-width: 660px) { .tb > .tbn { display: none; } }
/* The type-ahead under the search box stays inside the window at every width: it opens toward the left from the box's right edge and is never wider than the window.
 * s1-search-fit (global-search.js) shifts it back in if the box sits near the left edge. */
.s1ta { left: auto; right: 0; width: min(560px, calc(100vw - 24px)); min-width: 0; max-width: calc(100vw - 24px); box-sizing: border-box; }
.s1ta-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
