/* The Oktane: the bar under the header on /app/ and /teams/ (23 Nov 2026).
   An iPhone-style switch between the two product pages. Each page stays exactly as it is;
   the switch moves to the other page, and browsers that can do it fade between the two pages. */
.oksw {
  position: fixed; left: 0; right: 0; top: var(--swtop, 64px); z-index: 49;
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  background: rgba(22, 21, 20, 0.74); color: #F3EDE3;
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  view-transition-name: oktane-switch;
}
.oksw-t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.oksw-t a { color: inherit; text-decoration: none; }

/* the segmented control */
.oksw-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 10px; background: rgba(118, 118, 128, 0.28); }
.oksw-seg::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 8px;
  background: #636366; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transform: translateX(calc(var(--on, 0) * 100%)); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  view-transition-name: oktane-switch-thumb;
}
.oksw-seg[data-on="1"] { --on: 1; }
.oksw-seg a {
  position: relative; z-index: 1; display: grid; place-items: center; min-width: 112px; height: 32px; padding: 0 14px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em; color: inherit; text-decoration: none; white-space: nowrap;
  opacity: 0.72; transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.oksw-seg a[aria-current="page"] { opacity: 1; font-weight: 600; }
.oksw-seg a:hover { opacity: 1; }
.oksw-seg a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 8px; }
.oksw-seg a:active { transform: scale(0.97); }

/* light version, when the page under it is light (the /app/ header turns light on cream sections) */
.bar.t-paper + .oksw, .oksw.light {
  background: rgba(233, 226, 213, 0.84); color: #1C1B19; box-shadow: 0 1px 0 rgba(28, 27, 25, 0.1);
}
.bar.t-paper + .oksw .oksw-seg, .oksw.light .oksw-seg { background: rgba(118, 118, 128, 0.14); }
.bar.t-paper + .oksw .oksw-seg::before, .oksw.light .oksw-seg::before { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
/* the open phone menu covers the bar */
.bar.open + .oksw { visibility: hidden; }

/* /app/: the header is 56px under 900px */
@media (max-width: 899px) { .oksw { --swtop: 56px; } }
/* phones: the switch alone, centred and wide */
@media (max-width: 599px) {
  .oksw { height: 50px; justify-content: center; }
  .oksw-t { display: none; }
  .oksw-seg { width: min(100%, 340px); }
  .oksw-seg a { min-width: 0; height: 34px; font-size: 15px; }
}

/* the /app/ opening moves down by the bar's height, so nothing sits under it */
.has-sw .hcopy { top: calc(11svh + 44px + 40px); }
@media (max-width: 699px) { .has-sw .hcopy { top: calc(9svh + 40px + 38px); } }

/* moving between the two pages: a short fade where the browser supports it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .oksw-seg::before { transition: none; }
}

/* /teams/ on phones: a little more room between the bar and the first line */
@media (max-width: 599px) { .has-sw .tw-hero { padding-top: 150px; } }
/* the two halves answer a 44px touch, the switch looks the same */
.oksw-seg a::after { content: ""; position: absolute; inset: -6px 0; }
