/* Floating bar. Tokens live on the bar, not on :root.
   Black and white. JetBrains Mono. One row on a phone. */

.welcome-orb {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000000;
  pointer-events: auto;
}
.welcome-orb-leave { animation: orb-leave 360ms ease forwards; }
.welcome-orb-short { animation: orb-short 180ms ease; }
@keyframes orb-leave { to { opacity: 0; } }
@keyframes orb-short { from { opacity: 0; } to { opacity: 1; } }
.welcome-orb-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 168px;
  height: 168px;
  transform: translate(-50%, -50%);
}
.welcome-orb-face {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffffff, #fbfbfa 42%, #d9d9d6 78%, #bdbdb8);
}
.welcome-orb-eye {
  position: absolute;
  top: 38%;
  width: 10px;
  height: 22px;
  border-radius: 999px;
  background: #2b2c30;
}
.welcome-orb-eye:first-child { left: 34%; }
.welcome-orb-eye:last-child { left: 54%; }
.welcome-orb-moon {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fbfbfa;
}
.welcome-orb-moon[data-n="0"] { left: -6px; top: 78px; width: 16px; height: 16px; }
.welcome-orb-moon[data-n="1"] { right: -18px; top: 36px; }
@media (prefers-reduced-motion: reduce) {
  .welcome-orb-leave { animation-duration: 180ms; }
}

body > nav.nav {
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-ui: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ink: #000000;
  --ink-rgb: 0, 0, 0;
  --on-ink: #ffffff;
  --pane: rgba(255, 255, 255, 0.78);
  --pane-edge: rgba(0, 0, 0, 0.16);
  --shadow-rgb: 0, 0, 0;
  --g-blur: 12px;
  --g-bright: 105%;
  --g-sat: 140%;
  --g-edge-hi: 0.9;
  --g-edge-lo: 0.14;
  --g-edge-far: 0.28;
  --g-spec: 0.72;
  --g-lift: 0.16;
  position: fixed;
  z-index: 60;
  left: 50%;
  top: max(10px, env(safe-area-inset-top));
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: calc(100vw - 16px);
  height: 44px;
  margin: 0;
  padding: 0 6px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--pane);
  color: var(--ink);
  font-family: var(--font-ui);
  backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat)) brightness(var(--g-bright));
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(var(--g-sat)) brightness(var(--g-bright));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, var(--g-spec)), 0 10px 40px rgba(var(--shadow-rgb), var(--g-lift));
  transform: translateX(-50%) translateY(-14px);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
html.nav-in .nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1), height 240ms ease, padding 240ms ease;
}
html.nav-in .nav.tucked {
  height: 36px;
  padding-left: 10px;
  transform: translateX(-50%) translateY(2px) scale(0.98);
}
.nav .brand {
  flex: none;
  display: flex;
  align-items: center;
  margin: 0 8px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-decoration: none;
  text-transform: none;
  line-height: 0;
}
.nav .brand img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav a:not(.brand) {
  flex: none;
  padding: 6px 7px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 #000000; }
.nav-start {
  flex: none;
  margin-left: 4px;
  padding: 7px 10px !important;
  border-radius: 999px;
  background: #000000;
  color: #ffffff !important;
}
html.nav-in .nav.tucked .nav-start { padding: 5px 8px !important; }
.nav-desk { display: none; }
html:not(.auth-known) .nav-guest,
html:not(.auth-known) .nav-desk { visibility: hidden; }
html.signed-in .nav-guest { display: none !important; }
html.signed-in .nav-desk { display: inline; visibility: visible; }
html { scroll-padding-top: calc(76px + env(safe-area-inset-top)); }
body:not(.workspace-page) { padding-top: calc(76px + env(safe-area-inset-top)); }
@media (max-width: 720px) {
  .nav { height: 40px; padding-right: 4px; }
  .nav a:not(.brand) { font-size: 10px; padding: 6px 6px; }
  .nav-links { max-width: 52vw; }
}
@media (prefers-reduced-motion: reduce) {
  html.nav-in .nav, html.nav-in .nav.tucked { transition-duration: 1ms; }
}
