.nav-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.nav-account[hidden] { display: none; }
.nav-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(21, 43, 45, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--c-header-dark);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10, 18, 14, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.nav-avatar:hover {
  background: #fff;
  border-color: rgba(21, 43, 45, 0.34);
  box-shadow: 0 8px 20px rgba(10, 18, 14, 0.12);
  transform: translateY(-1px);
}
.nav-avatar:focus-visible {
  outline: 2px solid rgba(21, 43, 45, 0.4);
  outline-offset: 3px;
}
.nav-avatar-picture {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 251, 251, 0.96), transparent 42%),
    linear-gradient(145deg, rgba(215, 233, 214, 0.96), rgba(163, 181, 154, 0.42));
  color: var(--c-header-dark);
}
.nav-avatar-picture img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.nav-avatar-icon {
  width: 18px;
  height: 18px;
  opacity: 0.82;
}
.nav-avatar-caret {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: var(--c-header-dark);
}
.nav-avatar-caret::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-right: 1.4px solid #fff;
  border-bottom: 1.4px solid #fff;
  transform: rotate(45deg);
}
.nav-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(260px, calc(100vw - 40px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(21, 43, 45, 0.14);
  box-shadow: 0 18px 42px rgba(10, 18, 14, 0.17), 0 5px 14px rgba(10, 18, 14, 0.10);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}
.nav-account.is-open .nav-account-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-account-label {
  color: var(--accent);
  font: 10px/1 var(--mono);
  letter-spacing: 0.72px;
  text-transform: uppercase;
}
.nav-account-menu strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--c-header-dark);
}
/* The menu markup is <span class="nav-account-email"> and
   <span class="nav-account-sep"> (ambi-account.js, early-access.js), but only
   `strong` above was ever styled — so the address took whatever colour the
   page set and disappeared entirely on the white-on-water pages. State the
   colour here rather than relying on what the page happens to inherit. */
.nav-account-email {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--c-header-dark);
}
.nav-account-sep {
  display: block;
  height: 1px;
  margin: 2px 0;
  background: rgba(21, 43, 45, 0.12);
}

.nav-account-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--wash);
  color: var(--c-header-dark);
  font: 13px/1 var(--font-body);
  text-align: left;
  cursor: pointer;
}
.nav-account-menu button:hover { background: rgba(215, 233, 214, 0.62); }

/* ---------- sign-in overlay (assets/ambi-account.js) ----------
   Any page can raise the Early Access flow without navigating away; the page
   underneath keeps its scroll position and state. */
.account-overlay {
  position: fixed;
  inset: 0;
  /* The modal must stay above the page-level Cookie notice (10000). */
  z-index: 10001;
}
.account-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(21, 43, 45, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.account-overlay__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
/* the water pages: the design's blur overlay (Figma 4188:48868 — #143C20
   at 40% over a 60 background blur); the glass dialog is drawn by the flow
   page itself (early-access.html, html.ea-water) */
.account-overlay--water .account-overlay__scrim {
  background: rgba(20, 60, 32, 0.4);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}

