/* Original switch proportions and easing; only its charcoal surface is refined. */
.pmb-account-toggle.avatar-switch {
  --thumb-size: 54px;
  --pill-height: calc(var(--thumb-size) * .8);
  --thumb-offset: calc(var(--thumb-size) / 3);
  --switch-ease: cubic-bezier(.34, 1.56, .64, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: var(--pill-height);
  margin: 0 var(--thumb-offset);
  padding: 0;
  border: 0;
  border-radius: 9999px;
  overflow: visible;
  color: #fff;
  background: #34363c;
  box-shadow: inset 0 1px 0 #ffffff24, 0 5px 14px #24262c24;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color .36s var(--switch-ease), box-shadow .25s ease, transform .12s ease;
}
.pmb-account-toggle.avatar-switch:hover { background: #44474f; }
.pmb-account-toggle.avatar-switch:focus-visible { outline: 2px solid #555; outline-offset: 5px; }
.pmb-account-toggle.avatar-switch:active { transform: scale(.96); }
.avatar-switch__label-wrap {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  padding-left: 14px;
  padding-right: 6px;
  pointer-events: none;
  transition: transform .36s var(--switch-ease);
}
.avatar-switch__sizer, .avatar-switch__label {
  grid-area: 1 / 1;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.avatar-switch__sizer { visibility: hidden; height: 0; overflow: hidden; }
.avatar-switch__label { color: #fff; transition: opacity .24s ease, transform .24s ease, color .36s ease; }
.avatar-switch__label.is-changing { opacity: 0; transform: translateY(4px) scale(.96); }
.avatar-switch__thumb-spacer {
  width: calc(var(--thumb-size) - var(--thumb-offset));
  height: var(--pill-height);
  flex-shrink: 0;
  pointer-events: none;
}
.avatar-switch__thumb {
  position: absolute;
  top: 50%;
  left: calc(100% - var(--thumb-size) + var(--thumb-offset));
  transform: translateY(-50%);
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left .36s var(--switch-ease);
}
.avatar-switch__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease, filter .35s ease;
}
.avatar-switch__icon--barber { filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 .8px #fff); }
.pmb-account-menu[open] .avatar-switch {
  background: #d2f800;
  box-shadow: 0 6px 18px #d2f80073;
}
.pmb-account-menu[open] .avatar-switch__label { color: #111; }
.pmb-account-menu[open] .avatar-switch__label-wrap { transform: translateX(calc(var(--thumb-size) - var(--thumb-offset))); }
.pmb-account-menu[open] .avatar-switch__thumb { left: calc(-1 * var(--thumb-offset)); }
.pmb-account-menu[open] .avatar-switch__icon { transform: scale(1.05) rotate(-4deg); }
.pmb-account-menu[open] .avatar-switch__icon--barber { filter: none; }
.motion-paused .pmb-account-toggle.avatar-switch, .motion-paused .avatar-switch__label-wrap,
.motion-paused .avatar-switch__label, .motion-paused .avatar-switch__thumb,
.motion-paused .avatar-switch__icon { transition: none; }

/* Keep the original artwork and switch visible beside the wordmark on phones. */
@media (max-width: 1060px) and (min-width: 801px) {
  .site-header .header-layout { gap: 12px; }
  .header-layout .topbar { gap: 8px; padding-left: 6px; }
  .header-layout .nav-links a { padding-inline: 6px; font-size: 11px; }
  .header-brand .pmb-brand-wordmark { width: clamp(110px, 17vw, 180px); }
}
@media (max-width: 600px) {
  .avatar-switch__sizer, .avatar-switch__label { font-size: 12px; }
  .avatar-switch__label-wrap { padding-left: 12px; padding-right: 4px; }
  .header-layout .header-brand { flex: 1 1 auto; min-width: 0; }
  .header-layout .header-brand .pmb-brand-wordmark { flex: 0 1 145px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pmb-account-toggle.avatar-switch, .avatar-switch__label-wrap,
  .avatar-switch__label, .avatar-switch__thumb, .avatar-switch__icon { transition: none; }
}
