
.shell-icon, .nav-btn-icon {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-bar {
  --masthead-line: color-mix(in srgb, var(--on-dark) 22%, var(--rail));
  --masthead-hover: color-mix(in srgb, var(--on-dark) 11%, var(--rail));
  position: sticky;
  top: 0;
  z-index: 32;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(10px, 2vw, 32px);
  min-height: 56px;
  padding: 0 var(--workspace-gutter);
  margin: 0 calc(-1 * var(--workspace-gutter)) 18px;
  background: var(--rail);
  color: var(--on-dark);
}
.workspace-start, .masthead-brand, .masthead-nav, .workspace-menu-trigger,
.workspace-tools, .workspace-tool, .workspace-stream, .profile-button { display: flex; align-items: center; }
.workspace-start { gap: clamp(10px, 1.45vw, 24px); min-width: 0; }
.masthead-brand { min-width: 0; gap: 9px; }
.masthead-brand img { flex: none; display: block; width: 31px; height: 31px; }
.masthead-brand > span { min-width: 0; display: grid; gap: 1px; }
.masthead-brand strong {
  color: var(--on-dark); font: 690 16px/1.15 var(--font-display);
  letter-spacing: -.045em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.masthead-brand small {
  max-width: clamp(100px, 11vw, 180px); color: var(--on-dark-muted); white-space: nowrap; text-overflow: ellipsis;
  overflow: hidden; font: 500 9.5px/1.3 var(--font-sans);
}
.masthead-nav {
  align-self: stretch; gap: 2px;
  padding-inline-start: clamp(8px, 1.1vw, 18px);
  border-inline-start: 1px solid var(--masthead-line);
}
.masthead-link, .workspace-menu-trigger, .workspace-tool, .profile-button, .inbox-delete, .profile-action, .launcher-close, .launcher-link {
  margin: 0; appearance: none; cursor: pointer;
  color: inherit; background: transparent; border: 1px solid transparent; font: 550 12px/1.4 var(--font-sans);
}
.masthead-link {
  position: relative; min-height: 56px; padding: 10px clamp(7px, .73vw, 12px);
  color: var(--on-dark-muted); white-space: nowrap; font-weight: 560; letter-spacing: -.01em;
}
.masthead-link:hover { background: var(--masthead-hover); color: var(--on-dark); }
.masthead-link[aria-current="page"] { color: var(--on-dark); }
.masthead-link[aria-current="page"]::after {
  content: ''; position: absolute; bottom: 0; left: 8px; right: 8px; height: 3px;
  background: var(--on-dark);
}
.workspace-menu-trigger {
  flex: none; justify-content: center; gap: 7px; min-height: 32px; padding: 4px 10px;
  border: 1px solid var(--masthead-line); border-radius: var(--radius-sm); color: var(--on-dark);
}
.workspace-menu-trigger .shell-icon { width: 15px; height: 15px; }
.workspace-menu-trigger:disabled { opacity: .55; cursor: default; }
.workspace-menu-trigger:not(:disabled):hover, .workspace-menu-trigger[aria-expanded="true"] { background: var(--masthead-hover); }
.workspace-tools { flex: none; gap: 7px; }
.workspace-stream {
  flex: none; gap: 6px; margin-inline-end: 4px;
  color: color-mix(in srgb, var(--warn) 35%, var(--on-dark)); font: 550 11px/1.3 var(--font-sans);
}
.workspace-stream.stream-connected { color: color-mix(in srgb, var(--good) 35%, var(--on-dark)); }
.stream-light { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.workspace-tool, .profile-button {
  justify-content: center; gap: 7px; min-width: 34px; min-height: 34px; padding: 5px; border-radius: var(--radius-sm);
}
.workspace-tools .workspace-tool, .profile-button { color: var(--on-dark-muted); }
.workspace-tools :is(.workspace-tool,.profile-button):hover,
.workspace-tools :is(.workspace-tool,.profile-button)[aria-expanded="true"] { color: var(--on-dark); background: var(--masthead-hover); }
.workspace-tool { position: relative; }
.workspace-phone { padding-inline: 8px; border-color: var(--masthead-line); }
.workspace-notifications, .workspace-profile { position: relative; }
.workspace-notifications .notif-count {
  position: absolute; top: -1px; right: -1px; min-width: 14px;
  border: 1px solid var(--rail); border-radius: var(--radius);
  padding: 1px 3px; color: var(--brand-deep); background: var(--on-dark); text-align: center;
  font: 650 8px/1.2 var(--font-mono);
}
.workspace-profile { border-inline-start: 1px solid var(--masthead-line); padding-inline-start: 6px; }
.profile-button { padding-inline: 4px; }
.profile-icon {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px;
  border: 1px solid var(--masthead-line); border-radius: 50%; color: var(--on-dark);
}
.profile-icon .shell-icon { width: 14px; height: 14px; }
.profile-name { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-chevron { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.workspace-popover {
  position: absolute; inset: calc(100% + 10px) 0 auto auto; z-index: 1;
  width: min(340px, calc(100vw - 24px)); overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  color: var(--ink); background: var(--surface); box-shadow: var(--lift-lg);
}
.inbox-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.inbox-heading strong, .profile-summary strong { color: var(--ink-hi); font: 650 13px/1.3 var(--font-sans); }
.inbox-list { max-height: min(350px, 56vh); overflow-y: auto; }
.inbox-empty { margin: 0; padding: 16px 14px; color: var(--ink-2); font-size: 12px; }
.inbox-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto 24px; align-items: start; gap: 7px;
  padding: 11px 12px; border-bottom: 1px solid var(--line);
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row strong { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.inbox-row p { margin: 3px 0 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
.inbox-time { color: var(--ink-2); font-size: 10px; white-space: nowrap; }
.inbox-delete { display: grid; place-items: center; width: 24px; height: 24px; padding: 2px; color: var(--ink-2); }
.inbox-delete .shell-icon { width: 14px; height: 14px; }
.inbox-delete:hover, .profile-action:hover { color: var(--action); background: var(--well); }
.profile-menu { width: min(245px, calc(100vw - 24px)); padding: 5px; }
.profile-summary { display: grid; gap: 3px; padding: 10px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.profile-summary strong { overflow-wrap: anywhere; }
.profile-summary span { color: var(--ink-2); font-size: 11px; }
.workspace-profile .profile-action {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px;
  padding: 7px 8px; text-align: left; border-radius: var(--radius-sm);
  color: var(--ink); font: 550 12px/1.4 var(--font-sans); letter-spacing: normal;
}
.profile-action .shell-icon { width: 16px; height: 16px; }
.profile-action span { margin-inline-start: auto; color: var(--ink-2); font: 10px/1.4 var(--font-mono); }
.version-dialog, .workspace-launcher {
  position: fixed; padding: 0;
  margin: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  color: var(--ink); background: var(--surface); box-shadow: var(--lift-lg);
}
.version-dialog { width: min(510px, calc(100vw - 28px)); max-height: min(75vh, 650px); }
.version-dialog .workspace-tool:hover { color: var(--action); background: var(--well); }
.version-dialog::backdrop, .workspace-launcher::backdrop { background: var(--veil); }
.version-inner .modal-body { max-height: min(59vh, 540px); }

.workspace-launcher { width: min(830px, calc(100vw - 48px)); max-height: min(80dvh, 700px); overflow: hidden; }
.workspace-launcher:not([open]), .version-dialog:not([open]) { display: none; }
body:has(#workspace-launcher[open]) { overflow: hidden; }
.launcher-content { display: flex; flex-direction: column; max-height: inherit; }
.launcher-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px 18px; border-bottom: 1px solid var(--line);
}
.launcher-scope { margin: 0 0 4px; color: var(--ink-2); font: 550 11px/1.3 var(--font-sans); }
.launcher-heading h2 { margin: 0; color: var(--ink-hi); font: 650 24px/1.15 var(--font-display); letter-spacing: -.04em; }
.launcher-close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.launcher-close:hover { background: var(--well); }
.launcher-groups {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start;
  gap: 24px 22px; padding: 20px 26px 26px;
}
.launcher-group { min-width: 0; }
.launcher-group h3 {
  margin: 0 0 5px; padding: 0 0 7px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font: 650 11px/1.4 var(--font-sans);
}
.launcher-list { list-style: none; padding: 0; margin: 0; }
.launcher-link {
  width: 100%; display: flex; align-items: center; gap: 9px; min-height: 37px;
  padding: 6px; text-align: left; border-radius: var(--radius-sm);
  color: var(--ink); font-size: 12px;
}
.launcher-link .nav-btn-icon { width: 16px; height: 16px; color: var(--ink-2); }
.launcher-link span { overflow-wrap: anywhere; }
.launcher-link:hover { color: var(--action); background: var(--well); }
.launcher-link[aria-current="page"] { color: var(--action); background: var(--action-soft); font-weight: 650; }
.launcher-link[aria-current="page"] .nav-btn-icon { color: var(--action); }
.nav-btn-count { margin-inline-start: auto; padding: 1px 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: 500 10px/1.4 var(--font-mono); }

.workspace-start :is(button,a):focus-visible, .workspace-tools > button:focus-visible,
.workspace-notifications > button:focus-visible, .profile-button:focus-visible { outline: 2px solid var(--on-dark); outline-offset: -2px; }
.workspace-launcher :is(button,a):focus-visible, .workspace-popover :is(button,a):focus-visible,
.version-dialog :is(button,a):focus-visible, .scroll-top:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.scroll-top {
  position: fixed; inset: auto 18px 18px auto; z-index: 26; display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong);
  color: var(--ink); background: var(--surface); box-shadow: var(--lift-sm); cursor: pointer;
}

@media (max-width: 1150px) {
  .profile-name, .profile-button .workspace-chevron, .workspace-phone > span { display: none; }
  .workspace-tools { gap: 4px; }
  .workspace-start { gap: 11px; }
}
@media (max-width: 880px) {
  .masthead-nav { display: none; }
  .workspace-bar { min-height: 52px; }
  .workspace-menu-trigger { margin-inline-start: 5px; }
}
@media (max-width: 639px) {
  .workspace-bar { gap: 5px; min-height: 50px; margin-bottom: 14px; }
  .workspace-start { gap: 7px; }
  .masthead-brand { gap: 5px; }
  .masthead-brand img { width: 25px; height: 25px; }
  .masthead-brand strong { font-size: 13px; }
  .masthead-brand small { max-width: 106px; font-size: 8.5px; }
  .workspace-menu-trigger { min-height: 32px; gap: 5px; margin: 0; padding: 3px 7px; font-size: 11px; }
  .workspace-menu-trigger .shell-icon { width: 13px; height: 13px; }
  .workspace-tools { gap: 1px; }
  .workspace-stream { margin-inline-end: 1px; gap: 3px; }
  .workspace-stream span { max-width: 45px; font-size: 9px; }
  .stream-light { width: 5px; height: 5px; }
  .workspace-tool, .profile-button { min-width: 30px; min-height: 34px; }
  .workspace-profile { padding-inline-start: 2px; }
  .workspace-phone { border-color: transparent; padding-inline: 5px; }
  .workspace-popover { position: fixed; inset: 51px 12px auto auto; }
  .workspace-launcher {
    inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: 100dvh;
    margin: 0; border: 0; border-radius: 0;
  }
  .launcher-content { height: 100%; max-height: 100%; }
  .launcher-heading { padding: max(16px, env(safe-area-inset-top)) 18px 14px; }
  .launcher-heading h2 { font-size: 22px; }
  .launcher-groups { flex: 1; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 17px; padding: 14px 16px max(24px, env(safe-area-inset-bottom)); }
  .launcher-link { min-height: 41px; font-size: 13px; }
}
@media (max-width: 350px) {
  .masthead-brand small { display: none; }
  .workspace-menu-trigger .shell-icon { display: none; }
  .workspace-menu-trigger { padding-inline: 5px; }
  .profile-button { min-width: 28px; padding-inline: 0; }
  .workspace-start { gap: 4px; }
  .workspace-bar { column-gap: 3px; }
}
