/* Nav pill: the one owner of its surface, for every page. It keeps the same width while scrolling.
   Loaded after each page's own stylesheets. Pages set the tokens below, never the surface itself.

   Surface: .nav-inner keeps its full box (so layout never changes) and draws nothing; its ::before
   draws the pill (fill, hairline, blur, shadow). The transparent 1px border only reserves the space
   the visible hairline used to take.

   Condense (retired): js/nav-condense.js still toggles .nav-condensed past ~24px of scroll, but the pill no longer narrows. It used to: from 1150px wide the
   visible pill narrows to 1080px. ::before scales on X by 1080px / its own width, with its corner
   radius divided by the same factor so the ends stay round, and the logo and actions slide in by the
   gap on each side (the links with the actions where a page has them). Only transforms and the radius change, so no layout and no layout shift (an
   animated width, or left/right on ::before, is reported as layout shift). The factor and the gap are
   plain CSS maths on the container's width (container units, atan2/tan for the ratio); nothing is
   measured in JS. One transition per toggle, never tied to scroll position.

   Size: this file is also the one owner of how tall the nav is. --nav-h (gap above the pill + the pill)
   is the number every page offset is built from (hero top margins, scroll-margin/scroll-padding, sticky
   `top`, mobile menu height); never write the nav's height as a literal anywhere else. */

:root {
  /* size: change these four and every offset follows */
  --nav-gap: 8px;                                  /* space above the pill (12px on phones, below) */
  --nav-pill-h: 54px;                              /* the pill */
  --nav-h: calc(var(--nav-gap) + var(--nav-pill-h));
  --nav-ctl: 36px;                                 /* Log in, Get started, theme and menu buttons */
  --nav-logo-h: 28px;
  --nav-surface-bg: rgba(255,255,255,.88);
  --nav-surface-bd: rgba(32,40,50,.10);
  --nav-surface-shadow: 0 8px 30px rgba(28,39,48,.07), 0 1px 3px rgba(28,39,48,.03);
  --nav-surface-blur: blur(20px) saturate(150%);
  --nav-surface-radius: 999px;
  --nav-condensed-w: 1080px;
  --nav-ease: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --nav-surface-bg: rgba(26,28,32,.90);
  --nav-surface-bd: rgba(255,255,255,.086);
  --nav-surface-shadow: 0 8px 28px rgba(0,0,0,.2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nav-surface-bg: rgba(26,28,32,.90);
    --nav-surface-bd: rgba(255,255,255,.086);
    --nav-surface-shadow: 0 8px 28px rgba(0,0,0,.2);
  }
}

/* the app-style pages (nav.js) take their surface from the v4 glass tokens; once the page has
   scrolled (script.js adds .nav-solid, also on the homepage) the glass gets denser and lifts */
body.zs26:not(.arc-concept) .nav {
  --nav-surface-bg: var(--glass-v4);
  --nav-surface-bd: var(--glass-v4-bd);
  --nav-surface-shadow: 0 10px 42px rgba(18, 25, 20, .07);
  --nav-surface-radius: var(--r-pill);
}
body.zs26 .nav.nav-solid {
  --nav-surface-bg: var(--glass-bg);
  --nav-surface-shadow: var(--e3);
}

.nav-inner {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  border: 1px solid transparent;
  /* the box is 100cqw + 30px padding + 2px border wide from 1150px up; the pill condenses to --nav-condensed-w */
  --nav-inset: max(0px, calc((100cqw + 32px - var(--nav-condensed-w)) / 2));
  --nav-fit: min(1, tan(atan2(var(--nav-condensed-w), calc(100cqw + 32px))));
}
.nav-inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  pointer-events: none;
  box-sizing: border-box;
  background: var(--nav-surface-bg);
  border: 1px solid var(--nav-surface-bd);
  border-radius: var(--nav-surface-radius);
  box-shadow: var(--nav-surface-shadow);
  -webkit-backdrop-filter: var(--nav-surface-blur);
  backdrop-filter: var(--nav-surface-blur);
  transition: scale .4s var(--nav-ease), border-radius .4s var(--nav-ease), box-shadow .3s ease, background .3s ease;
}
.nav-inner .nav-logo, .nav-inner .nav-links, .nav-inner .nav-actions { transition: translate .4s var(--nav-ease); }

/* The pill keeps one width the whole time: scrolling no longer condenses it (.nav-condensed has no visual effect). */

.nav.nav-condense-instant .nav-inner::before,
.nav.nav-condense-instant .nav-inner .nav-logo,
.nav.nav-condense-instant .nav-inner .nav-links,
.nav.nav-condense-instant .nav-inner .nav-actions { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .nav-inner::before, .nav-inner .nav-logo, .nav-inner .nav-links, .nav-inner .nav-actions { transition: none; }
}

/* Nav links: the one owner of the link pill (padding, radius, type, hover, press, focus) for every page.
   Blog markup calls them .nav-link, the generated landing nav .nav-docs-link. */
.nav-actions > .nav-link, .nav-actions > .nav-docs-link {
  padding: 6px 10px; border-radius: 16px;
  font-size: 14.5px; font-weight: 500; line-height: 1.6; color: var(--ink, #101210); text-decoration: none;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
@media (min-width: 1150px) { .nav-actions > .nav-link, .nav-actions > .nav-docs-link { margin-right: -6px; } }
@media (hover: hover) {
  .nav-actions > .nav-link:hover, .nav-actions > .nav-docs-link:hover { background: var(--green-tint, var(--accent-tint, #dce8ff)); color: var(--green-deep, var(--accent-deep, #244fae)); }
}
.nav-actions > .nav-link:active, .nav-actions > .nav-docs-link:active { transform: translateY(1px); }
.nav-actions > .nav-link:focus-visible, .nav-actions > .nav-docs-link:focus-visible { outline: 2px solid var(--accent-deep, #244fae); outline-offset: 2px; }

/* Nav size. Written once here, loaded after every page's own stylesheet, so the pages' older nav sizes
   (padding, min-height, button and logo sizes) no longer apply. The pill keeps a minimum height and no
   vertical padding, so a menu that opens inside it can still grow it. */
@media (max-width: 560px) {
  :root { --nav-gap: 12px; --nav-pill-h: 52px; --nav-logo-h: 26px; }
}
/* The pill sits --nav-gap from the top on every device, never env(safe-area-inset-top). On iOS (viewport-fit=cover)
   the status bar then overlays the glass pill as it always did, instead of a flat page-colour strip, and --nav-h
   stays the real height, so nothing below the nav (hero offsets, sticky tops, menu height) overlaps it. */
:root body .nav { padding-top: var(--nav-gap); }
:root body .nav-inner {
  box-sizing: border-box; min-height: var(--nav-pill-h);
  padding-top: 0; padding-bottom: 0; padding-right: 10px;
}
@media (min-width: 1150px) { :root body .nav-inner { padding-left: 20px; } }
:root body .nav-logo img, :root body .nav-logo-icon { height: var(--nav-logo-h); width: calc(var(--nav-logo-h) * 137 / 32); object-fit: contain; }
:root body .nav-actions .nav-login-pill, :root body .nav-actions .nav-get-started {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: var(--nav-ctl); padding-block: 0; padding-inline: 16px; font-size: 14px; line-height: 1;
}
:root body .nav-actions .nav-get-started { padding-inline: 18px; font-size: 14.5px; }
/* Theme and menu buttons: a 44px tap target (layout box, transparent) around the 36px visible circle, which is the ::before.
   The circle carries the surface, hover and focus ring; the -4px side margins keep the circles where 36px buttons would sit. */
:root:root body :is(.arc-theme-toggle, .nav-mobile-toggle, .nav-more > summary) {
  position: relative; isolation: isolate; box-sizing: border-box; width: 44px; height: 44px; margin-inline: -4px;
  background: transparent !important; border-color: transparent !important; box-shadow: none; outline: none;
}
:root:root body :is(.arc-theme-toggle, .nav-mobile-toggle, .nav-more > summary)::before {
  content: ''; position: absolute; top: 50%; left: 50%; z-index: -1; box-sizing: border-box;
  width: var(--nav-ctl); height: var(--nav-ctl); translate: -50% -50%; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--surface);
  transition: background-color .18s ease, border-color .18s ease;
}
@media (hover: hover) {
  :root:root body :is(.arc-theme-toggle, .nav-mobile-toggle, .nav-more > summary):hover::before { background: var(--green-tint, var(--accent-tint, #dce8ff)); }
}
:root:root body :is(.arc-theme-toggle, .nav-mobile-toggle, .nav-more > summary):focus-visible::before { outline: 2px solid var(--btn-ring, var(--accent-deep, #244fae)); outline-offset: 2px; }
:root body .arc-theme-toggle svg { width: 18px; height: 18px; }
/* Blog-style nav on a phone: Log in and Get started live in the menu (as on the homepage), so the logo keeps its width */
@media (max-width: 560px) {
  :root body .nav-actions:has(> .nav-more) > :is(.nav-login-pill, .nav-get-started) { display: none; }
}
:root body .nav-more { display: flex; align-items: center; }
/* blog.css hides the menu button once the links fit (1150px); the rule above is more specific, so say it again here */
@media (min-width: 1150px) { :root body .nav-more { display: none; } }

/* Talk to us: two overlapping faces (Ryan in front, Gabe behind) and a link to /talk/. It is a .nav-docs-link, so the link pill's
   hover, press and focus above apply; this only adds the faces and the 44px target. The ring is the nav's own fill, solid. */
:root { --nav-ring: #fff; }
:root[data-theme="dark"] { --nav-ring: #1a1c20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --nav-ring: #1a1c20; } }
.nav-talk { display: inline-flex; align-items: center; gap: 9px; }
.nav-actions > .nav-talk { min-height: 44px; padding-left: 8px; }
.nav-faces { display: inline-flex; align-items: center; flex: none; }
.nav-faces picture { display: block; flex: none; }
.nav-faces img { display: block; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-sizing: content-box; border: 2px solid var(--nav-ring); margin: -2px; }
.nav-faces picture + picture { margin-left: -8px; }
.nav-faces picture:first-child { position: relative; z-index: 1; }
.nav-mobile-menu .nav-talk { min-height: 44px; }
