/**
 * AbayaFemme storefront header.
 * A compact, full-width fashion-house composition with three quiet horizontal bands.
 */

.af-site-header {
  --af-header-paper: oklch(0.988 0.006 76);
  --af-header-ground: oklch(0.965 0.009 76);
  --af-header-ink: oklch(0.235 0.012 78);
  --af-header-muted: oklch(0.49 0.012 76);
  --af-header-olive: oklch(0.39 0.035 104);
  --af-header-line: oklch(0.885 0.012 73);
  --af-header-focus: oklch(0.47 0.12 251);
  position: sticky;
  top: 0;
  z-index: 900;
  color: var(--af-header-ink);
  background: var(--af-header-paper);
  border-bottom: 1px solid var(--af-header-line);
}

.admin-bar .af-site-header {
  top: 32px;
}

.af-site-header .af-container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1.5rem, 3.25vw, 4.5rem);
}

.af-header__main {
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(28rem, 1.9fr) minmax(15rem, 0.78fr);
  align-items: center;
  gap: clamp(1.75rem, 3vw, 4.5rem);
  min-height: 5.35rem;
}

.af-header__wordmark,
.af-mobile-nav__wordmark {
  color: var(--af-header-ink);
  font-family: var(--af-font-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-decoration: none;
}

.af-header__wordmark {
  justify-self: start;
  font-size: clamp(2.55rem, 2.75vw, 3.15rem);
  white-space: nowrap;
}

.af-header__wordmark:hover,
.af-header__wordmark:focus-visible {
  color: var(--af-header-olive);
}

.af-header-search,
.af-mobile-nav__search {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.af-header-search input[type="search"],
.af-mobile-nav__search input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  height: 3.15rem;
  margin: 0;
  padding: 0.75rem 3.6rem 0.75rem 1.2rem;
  color: var(--af-header-ink);
  background: var(--af-header-ground);
  border: 1px solid transparent;
  border-bottom-color: var(--af-header-line);
  border-radius: 0.2rem;
  box-shadow: none;
  font-family: var(--af-font-ui);
  font-size: 0.9rem;
  line-height: 1.2;
  appearance: none;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.af-header-search input[type="search"]::placeholder,
.af-mobile-nav__search input[type="search"]::placeholder {
  color: var(--af-header-muted);
  opacity: 1;
}

.af-header-search input[type="search"]:focus,
.af-mobile-nav__search input[type="search"]:focus {
  background: var(--af-header-paper);
  border-color: var(--af-header-olive);
  outline: 2px solid color-mix(in oklch, var(--af-header-focus) 35%, transparent);
  outline-offset: 1px;
}

.af-header-search button,
.af-mobile-nav__search button {
  position: absolute;
  inset-inline-end: 0.3rem;
  display: grid;
  width: 2.75rem;
  height: 2.55rem;
  place-items: center;
  padding: 0;
  color: var(--af-header-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.af-header-search button:hover,
.af-header-search button:focus-visible,
.af-mobile-nav__search button:hover,
.af-mobile-nav__search button:focus-visible {
  color: var(--af-header-olive);
}

.af-site-header svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.af-header-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: clamp(0.85rem, 1.45vw, 1.65rem);
}

.af-header-actions > a,
.af-account-menu__trigger {
  position: relative;
  display: flex;
  min-width: 3.2rem;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.2rem;
  color: var(--af-header-ink);
  font-family: var(--af-font-ui);
  font-size: 0.72rem;
  font-weight: 570;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
}

.af-header-actions > a::after,
.af-account-menu__trigger::after {
  position: absolute;
  inset: auto 20% 0;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.af-header-actions > a:hover,
.af-header-actions > a:focus-visible,
.af-account-menu__trigger:hover,
.af-account-menu__trigger:focus-visible {
  color: var(--af-header-olive);
}

.af-header-actions > a:hover::after,
.af-header-actions > a:focus-visible::after,
.af-account-menu__trigger:hover::after,
.af-account-menu__trigger:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.af-header-cart__icon,
.af-header__mobile-cart {
  position: relative;
}

.af-header-cart__icon {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
}

.af-cart-count {
  position: absolute;
  inset-block-start: -0.5rem;
  inset-inline-end: -0.65rem;
  display: grid;
  min-width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  padding-inline: 0.2rem;
  color: oklch(0.985 0.006 76);
  background: var(--af-header-olive);
  border: 2px solid var(--af-header-paper);
  border-radius: var(--af-radius-pill);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.af-cart-count[hidden] {
  display: none;
}

.af-header-nav {
  background: color-mix(in oklch, var(--af-header-paper) 76%, var(--af-header-ground));
  border-top: 1px solid var(--af-header-line);
}

.af-header-nav__inner {
  display: flex;
  min-height: 3.35rem;
  align-items: stretch;
  gap: 0;
}

.af-header-nav__featured {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--af-header-olive);
  font-family: var(--af-font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.af-header-nav__featured:hover,
.af-header-nav__featured:focus-visible {
  color: var(--af-header-ink);
}

.af-nav__menu,
.af-nav__menu .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-nav__menu li {
  margin: 0;
}

.af-nav__menu--desktop {
  display: contents;
}

.af-nav__menu--desktop > li {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: stretch;
  justify-content: center;
}

.af-nav__menu--desktop > li > a {
  position: relative;
  display: flex;
  min-height: 3.35rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  color: var(--af-header-ink);
  font-family: var(--af-font-ui);
  font-size: 0.78rem;
  font-weight: 630;
  letter-spacing: 0.055em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.af-nav__menu--desktop > .menu-item-has-children > a::after {
  width: 0.38rem;
  height: 0.38rem;
  margin-block-start: -0.2rem;
  content: "";
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.af-nav__menu--desktop > li > a::before {
  position: absolute;
  inset: auto 0 0.6rem;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.af-nav__menu--desktop > li > a:hover,
.af-nav__menu--desktop > li > a:focus-visible,
.af-nav__menu--desktop > .current-menu-item > a,
.af-nav__menu--desktop > .current-menu-ancestor > a,
.af-nav__menu--desktop > .current-menu-parent > a {
  color: var(--af-header-olive);
}

.af-nav__menu--desktop > li > a:hover::before,
.af-nav__menu--desktop > li > a:focus-visible::before,
.af-nav__menu--desktop > .current-menu-item > a::before,
.af-nav__menu--desktop > .current-menu-ancestor > a::before,
.af-nav__menu--desktop > .current-menu-parent > a::before {
  opacity: 1;
  transform: scaleX(1);
}

.af-nav__menu--desktop .sub-menu {
  position: absolute;
  z-index: 30;
  inset-block-start: calc(100% - 1px);
  inset-inline-start: -1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(11rem, 1fr));
  width: min(31rem, 82vw);
  max-height: min(72vh, 35rem);
  padding: 1.1rem;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  background: var(--af-header-paper);
  border: 1px solid var(--af-header-line);
  border-top: 2px solid var(--af-header-olive);
  box-shadow: 0 1.4rem 3.2rem oklch(0.24 0.018 74 / 0.11);
  transform: translateY(0.45rem);
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 180ms;
}

.af-nav__menu--desktop > li:nth-last-child(-n + 3) > .sub-menu {
  inset-inline: auto -1.25rem;
}

.af-nav__menu--desktop li:hover > .sub-menu,
.af-nav__menu--desktop li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

.af-nav__menu--desktop .sub-menu a {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--af-header-ink);
  font-family: var(--af-font-ui);
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration: none;
}

.af-nav__menu--desktop .sub-menu a:hover,
.af-nav__menu--desktop .sub-menu a:focus-visible {
  color: var(--af-header-olive);
  background: var(--af-header-ground);
}

.af-nav__menu--desktop .sub-menu .sub-menu {
  position: static;
  display: block;
  width: auto;
  max-height: none;
  padding: 0 0 0 0.9rem;
  visibility: visible;
  opacity: 1;
  border: 0;
  box-shadow: none;
  transform: none;
}

.af-mobile-nav,
.af-header__mobile-cart {
  display: none;
}

@media (max-width: 1099px) {
  .af-site-header .af-container {
    padding-inline: 1rem;
  }

  .af-header__main {
    grid-template-columns: 3.15rem minmax(0, 1fr) 3.15rem;
    gap: 0.6rem;
    min-height: 0;
    padding-block: 0.55rem 0.7rem;
  }

  .af-header__wordmark {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    font-size: clamp(2.05rem, 7vw, 2.45rem);
  }

  .af-header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .af-header-search input[type="search"] {
    height: 3.15rem;
    padding-inline: 1rem 3.4rem;
    font-size: 0.94rem;
  }

  .af-header-actions,
  .af-header-nav {
    display: none;
  }

  .af-header__mobile-cart {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    display: grid;
    width: 3.15rem;
    height: 3.15rem;
    place-items: center;
    color: var(--af-header-ink);
    text-decoration: none;
  }

  .af-header__mobile-cart .af-cart-count {
    inset-block-start: -0.4rem;
    inset-inline-end: -0.5rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding-inline: 0.16rem;
    border-width: 1px;
    font-size: 0.58rem;
  }

  .af-mobile-nav {
    grid-column: 1;
    grid-row: 1;
    display: block;
  }

  .af-mobile-nav__trigger {
    display: flex;
    width: 3.15rem;
    height: 3.15rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--af-header-ink);
    cursor: pointer;
    list-style: none;
  }

  .af-mobile-nav__trigger::-webkit-details-marker {
    display: none;
  }

  .af-mobile-nav__trigger:hover,
  .af-mobile-nav__trigger:focus-visible,
  .af-header__mobile-cart:hover,
  .af-header__mobile-cart:focus-visible {
    color: var(--af-header-olive);
  }

  .af-mobile-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .af-mobile-nav__icon--close {
    display: none;
  }

  .af-mobile-nav[open] > .af-mobile-nav__trigger {
    position: fixed;
    z-index: 1004;
    top: 1rem;
    left: calc(min(91vw, 27rem) - 4rem);
    color: var(--af-header-ink);
    background: var(--af-header-paper);
  }

  .admin-bar .af-mobile-nav[open] > .af-mobile-nav__trigger {
    top: calc(32px + 1rem);
  }

  .af-mobile-nav[open] .af-mobile-nav__icon--open {
    display: none;
  }

  .af-mobile-nav[open] .af-mobile-nav__icon--close {
    display: block;
  }

  .af-mobile-nav__backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    background: oklch(0.18 0.012 74 / 0.62);
  }

  .af-mobile-nav[open] > .af-mobile-nav__backdrop {
    display: block;
  }

  .af-mobile-nav__panel {
    position: fixed;
    z-index: 1001;
    inset: 0 auto 0 0;
    display: flex;
    width: min(91vw, 27rem);
    flex-direction: column;
    padding: calc(1.45rem + env(safe-area-inset-top)) 1.25rem
      calc(1.5rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    background: var(--af-header-paper);
    box-shadow: 1.5rem 0 4rem oklch(0.18 0.012 74 / 0.2);
    transform: translateX(-102%);
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 260ms;
  }

  .admin-bar .af-mobile-nav__panel {
    padding-top: calc(32px + 1.45rem + env(safe-area-inset-top));
  }

  .af-mobile-nav[open] > .af-mobile-nav__panel {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .af-mobile-nav__heading {
    padding-inline-end: 3.2rem;
    padding-bottom: 1.25rem;
  }

  .af-mobile-nav__wordmark {
    display: block;
    font-size: 2.45rem;
  }

  .af-mobile-nav__heading p {
    margin: 0.55rem 0 0;
    color: var(--af-header-muted);
    font-family: var(--af-font-ui);
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .af-mobile-nav__search {
    margin-bottom: 0.85rem;
  }

  .af-mobile-nav__search input[type="search"] {
    height: 3.2rem;
    padding-inline: 1rem 3.3rem;
    font-size: 1rem;
  }

  .af-mobile-nav__shortcuts {
    display: grid;
    /*
     * `auto-fit` rather than a hard column count: the account shortcut moved into its own block
     * above the catalogue links, and a `repeat(3, …)` grid holding two items leaves a third of
     * the row empty with a divider hanging in it.
     */
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding-block: 0.65rem;
    border-block: 1px solid var(--af-header-line);
  }

  .af-mobile-nav__shortcuts a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 3.7rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.3rem;
    color: var(--af-header-ink);
    font-family: var(--af-font-ui);
    font-size: 0.76rem;
    font-weight: 570;
    text-decoration: none;
  }

  .af-mobile-nav__shortcuts a + a {
    border-inline-start: 1px solid var(--af-header-line);
  }

  .af-mobile-nav__shortcuts a:hover,
  .af-mobile-nav__shortcuts a:focus-visible {
    color: var(--af-header-olive);
  }

  .af-mobile-nav__shortcuts svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .af-mobile-nav__links {
    padding-top: 0.65rem;
  }

  .af-mobile-nav__featured {
    display: flex;
    min-height: 3.35rem;
    align-items: center;
    gap: 0.55rem;
    color: var(--af-header-olive);
    font-family: var(--af-font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid var(--af-header-line);
  }

  .af-mobile-nav__featured::before {
    width: 0.32rem;
    height: 0.32rem;
    content: "";
    background: currentColor;
    border-radius: 50%;
  }

  .af-nav__menu--mobile > li,
  .af-nav__menu--mobile .menu-item-has-children {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.15rem;
    align-items: start;
    border-bottom: 1px solid var(--af-header-line);
  }

  .af-nav__menu--mobile li:not(.menu-item-has-children) > a {
    grid-column: 1 / -1;
  }

  .af-nav__menu--mobile a {
    display: flex;
    min-height: 3.45rem;
    align-items: center;
    padding: 0.65rem 0.15rem;
    color: var(--af-header-ink);
    font-family: var(--af-font-ui);
    font-size: 0.95rem;
    font-weight: 580;
    line-height: 1.3;
    text-decoration: none;
  }

  .af-nav__menu--mobile a:hover,
  .af-nav__menu--mobile a:focus-visible {
    color: var(--af-header-olive);
  }

  .af-site-header .af-mobile-nav__submenu-toggle {
    display: grid;
    width: 3.15rem;
    height: 3.45rem;
    place-items: center;
    padding: 0;
    color: var(--af-header-ink);
    background: transparent !important;
    box-shadow: none;
    border: 0;
  }

  .af-mobile-nav__submenu-toggle span {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-0.15rem) rotate(45deg);
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-site-header .af-mobile-nav__submenu-toggle:hover,
  .af-site-header .af-mobile-nav__submenu-toggle:focus,
  .af-site-header .af-mobile-nav__submenu-toggle:focus-visible {
    color: var(--af-header-olive);
    background: transparent !important;
    box-shadow: none;
  }

  .af-mobile-nav__submenu-toggle[aria-expanded="true"] span {
    transform: translateY(0.12rem) rotate(-135deg);
  }

  .af-nav__menu--mobile .sub-menu {
    grid-column: 1 / -1;
    padding: 0.1rem 0 0.8rem 0.9rem;
  }

  .af-nav__menu--mobile .sub-menu[hidden] {
    display: none;
  }

  .af-nav__menu--mobile .sub-menu li {
    border: 0;
  }

  .af-nav__menu--mobile .sub-menu a {
    min-height: 2.65rem;
    padding-block: 0.45rem;
    color: var(--af-header-muted);
    font-size: 0.86rem;
    font-weight: 500;
  }

  .af-nav__menu--mobile .sub-menu .sub-menu {
    padding-inline-start: 0.8rem;
  }

  .af-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 782px) {
  .admin-bar .af-site-header {
    top: 46px;
  }

  .admin-bar .af-mobile-nav[open] > .af-mobile-nav__trigger {
    top: calc(46px + 1rem);
  }

  .admin-bar .af-mobile-nav__panel {
    padding-top: calc(46px + 1.45rem + env(safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .af-header__main {
    padding-inline: 0.85rem;
  }

  .af-header-search input[type="search"] {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-header-search input[type="search"],
  .af-mobile-nav__search input[type="search"],
  .af-header-actions > a::after,
  .af-nav__menu--desktop > li > a::before,
  .af-nav__menu--desktop .sub-menu,
  .af-mobile-nav__panel,
  .af-mobile-nav__submenu-toggle span {
    transition-duration: 1ms;
  }
}

/* ==========================================================================
   The account menu.

   Two surfaces, one view model: a panel that drops from the header on desktop, and a block
   at the top of the drawer on touch. `.af-header-actions` is already hidden below 1100px, so
   the panel below costs nothing on a phone and needs no media query of its own.

   Type sizes are written against this store's 14px root (WoodMart's `--wd-text-font-size`),
   which is why nothing here goes below 0.9rem: at this root that is already 12.6px, and the
   0.72rem the header labels use is legible only because they are three words of tracked caps.
   ========================================================================== */

.af-account-menu {
  position: relative;
  display: flex;
  align-items: stretch;
}

.af-account-menu__icon {
  position: relative;
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
}

/* The dot says "there is something", the panel says what. A number in a 14px header row is
   read as decoration; a dot is read as a state. */
.af-account-menu__dot {
  position: absolute;
  inset-block-start: -0.15rem;
  inset-inline-end: -0.2rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--af-header-olive);
  border: 1.5px solid var(--af-header-paper);
  border-radius: 50%;
}

.af-account-menu__panel {
  /* Anchored to the trigger and stretching up to it, so the pointer never crosses a gap the
     menu is not watching. `padding-top` is the whole bridge. */
  position: absolute;
  inset-block-start: 100%;
  inset-inline-end: -0.75rem;
  z-index: 20;
  width: min(34rem, calc(100vw - 3rem));
  padding-top: 1.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.4rem);
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 180ms linear;
}

/*
 * Hover and focus-within, both in CSS, are what make this work with scripting switched off:
 * a keyboard reaching the trigger opens the panel and Tab walks into it.
 */
.af-account-menu:hover > .af-account-menu__panel,
.af-account-menu:focus-within > .af-account-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/*
 * Escape has to win over both of the rules above, because "stop hovering" and "stop being
 * focused" are not things a script can ask for: after Escape the pointer is still over the menu
 * and focus is still on the trigger. `header.js` writes this attribute and removes it as soon as
 * she leaves, so the panel behaves normally again the next time she comes back.
 */
.af-account-menu[data-af-open="false"] > .af-account-menu__panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.4rem);
  pointer-events: none;
}

.af-account-menu__card {
  overflow: hidden;
  color: var(--af-header-ink);
  background: var(--af-header-paper);
  border: 1px solid var(--af-header-line);
  border-radius: 0.35rem;
  box-shadow: 0 26px 60px oklch(0.235 0.012 78 / 14%), 0 2px 6px oklch(0.235 0.012 78 / 6%);
  text-align: start;
}

/* --- Identity -------------------------------------------------------------- */

.af-account-menu__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  color: oklch(0.965 0.009 76);
  background: var(--af-header-olive);
}

.af-account-menu__avatar img,
.af-drawer-account__avatar img {
  display: block;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  object-fit: cover;
}

.af-account-menu__avatar .afc-avatar--initials,
.af-drawer-account__avatar .afc-avatar--initials {
  display: grid;
  width: 3.4rem;
  height: 3.4rem;
  place-items: center;
  background: oklch(0.965 0.009 76 / 18%);
  border-radius: 50%;
  font-family: var(--af-font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.af-account-menu__who {
  min-width: 0;
}

.af-account-menu__name {
  margin: 0;
  font-family: var(--af-font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.af-account-menu__meta {
  margin: 0.15rem 0 0;
  color: oklch(0.965 0.009 76 / 80%);
  font-family: var(--af-font-ui);
  font-size: 0.95rem;
  line-height: 1.35;
}

.af-account-menu__profile {
  display: inline-block;
  margin-top: 0.4rem;
  color: oklch(0.965 0.009 76);
  font-family: var(--af-font-ui);
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.af-account-menu__profile:hover,
.af-account-menu__profile:focus-visible {
  color: var(--af-header-paper);
  text-decoration-thickness: 2px;
}

/* --- The three numbers ----------------------------------------------------- */

.af-account-menu__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  background: var(--af-header-ground);
  border-bottom: 1px solid var(--af-header-line);
  list-style: none;
}

.af-account-menu__stats li + li {
  border-inline-start: 1px solid var(--af-header-line);
}

.af-account-menu__stats a {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 0.5rem;
  color: var(--af-header-ink);
  text-align: center;
  text-decoration: none;
}

.af-account-menu__stats a:hover,
.af-account-menu__stats a:focus-visible {
  background: var(--af-header-paper);
  color: var(--af-header-olive);
}

.af-account-menu__stat-value {
  font-family: var(--af-font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}

.af-account-menu__stat-label {
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.9rem;
  line-height: 1.25;
}

/* --- The two columns ------------------------------------------------------- */

.af-account-menu__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.af-account-menu__column {
  padding: 1.1rem 0.85rem 1.2rem;
}

.af-account-menu__column + .af-account-menu__column {
  border-inline-start: 1px solid var(--af-header-line);
}

.af-account-menu__column-title {
  margin: 0 0 0.5rem;
  padding-inline: 0.65rem;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.af-account-menu__column ul,
.af-account-menu__guest-rows ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-account-menu__column a,
.af-account-menu__guest-rows a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  color: var(--af-header-ink);
  border-radius: 0.25rem;
  font-family: var(--af-font-ui);
  font-size: 1.05rem;
  line-height: 1.3;
  text-decoration: none;
}

.af-account-menu__column a:hover,
.af-account-menu__column a:focus-visible,
.af-account-menu__guest-rows a:hover,
.af-account-menu__guest-rows a:focus-visible {
  background: var(--af-header-ground);
  color: var(--af-header-olive);
}

.af-account-menu__column a.is-current {
  background: var(--af-header-ground);
  box-shadow: inset 2px 0 0 var(--af-header-olive);
}

.af-account-menu__row-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--af-header-muted);
}

.af-account-menu__column a:hover .af-account-menu__row-icon,
.af-account-menu__column a:focus-visible .af-account-menu__row-icon,
.af-account-menu__guest-rows a:hover .af-account-menu__row-icon,
.af-account-menu__guest-rows a:focus-visible .af-account-menu__row-icon {
  color: var(--af-header-olive);
}

.af-account-menu__card svg,
.af-drawer-account svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.5;
}

.af-account-menu__row-label {
  min-width: 0;
}

.af-account-menu__badge,
.af-drawer-account .af-account-menu__badge {
  display: grid;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-inline-start: auto;
  place-items: center;
  padding-inline: 0.3rem;
  color: var(--af-header-paper);
  background: var(--af-header-olive);
  border-radius: 999px;
  font-family: var(--af-font-ui);
  font-size: 0.8rem;
  font-weight: 620;
  line-height: 1;
}

/* --- Foot ------------------------------------------------------------------ */

.af-account-menu__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem 0.85rem;
  background: var(--af-header-ground);
  border-top: 1px solid var(--af-header-line);
}

.af-account-menu__foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.95rem;
  text-decoration: none;
}

.af-account-menu__foot a:hover,
.af-account-menu__foot a:focus-visible {
  color: var(--af-header-olive);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- Guest ----------------------------------------------------------------- */

.af-account-menu__welcome {
  padding: 1.35rem 1.5rem 1.2rem;
}

.af-account-menu__eyebrow {
  margin: 0;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.af-account-menu__title {
  margin: 0.35rem 0 0;
  font-family: var(--af-font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.af-account-menu__intro {
  margin: 0.35rem 0 0;
  max-width: 36ch;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 1rem;
  line-height: 1.5;
}

.af-account-menu__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.af-account-menu__cta,
.af-drawer-account__cta {
  display: grid;
  min-height: 2.9rem;
  place-items: center;
  padding-inline: 1rem;
  color: var(--af-header-paper);
  background: var(--af-header-olive);
  border: 1px solid var(--af-header-olive);
  border-radius: 0.25rem;
  font-family: var(--af-font-ui);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
}

.af-account-menu__cta:hover,
.af-account-menu__cta:focus-visible,
.af-drawer-account__cta:hover,
.af-drawer-account__cta:focus-visible {
  background: oklch(0.32 0.035 104);
  color: var(--af-header-paper);
}

.af-account-menu__cta--ghost,
.af-drawer-account__cta--ghost {
  color: var(--af-header-olive);
  background: transparent;
}

.af-account-menu__cta--ghost:hover,
.af-account-menu__cta--ghost:focus-visible,
.af-drawer-account__cta--ghost:hover,
.af-drawer-account__cta--ghost:focus-visible {
  color: var(--af-header-paper);
}

.af-account-menu__guest-rows {
  padding: 0.5rem 0.85rem 0.75rem;
  border-top: 1px solid var(--af-header-line);
}

.af-account-menu__guest-rows a {
  align-items: flex-start;
  padding-block: 0.6rem;
}

.af-account-menu__guest-rows .af-account-menu__row-icon {
  margin-top: 0.15rem;
}

.af-account-menu__row-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.af-account-menu__row-help {
  color: var(--af-header-muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.af-account-menu__promises {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0.8rem 1.5rem 0.9rem;
  background: var(--af-header-ground);
  border-top: 1px solid var(--af-header-line);
  list-style: none;
}

.af-account-menu__promises li {
  position: relative;
  padding-inline-start: 1rem;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.95rem;
  line-height: 1.4;
}

.af-account-menu__promises li::before {
  position: absolute;
  inset-inline-start: 0;
  content: "—";
  color: var(--af-header-olive);
}

/* ==========================================================================
   The same menu inside the drawer.
   ========================================================================== */

.af-drawer-account {
  display: grid;
  gap: 0.85rem;
  padding-block: 0.9rem 1rem;
  border-bottom: 1px solid var(--af-header-line);
}

.af-drawer-account__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  color: oklch(0.965 0.009 76);
  background: var(--af-header-olive);
  border-radius: 0.3rem;
  text-decoration: none;
}

.af-drawer-account__who {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.af-drawer-account__name {
  font-family: var(--af-font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.15;
}

.af-drawer-account__meta {
  color: oklch(0.965 0.009 76 / 80%);
  font-family: var(--af-font-ui);
  font-size: 0.95rem;
}

.af-drawer-account__group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  margin: 0;
  color: var(--af-header-muted);
  font-family: var(--af-font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

/* Safari still draws a triangle for a `list-style: none` summary. */
.af-drawer-account__group-title::-webkit-details-marker {
  display: none;
}

/* The chevron is drawn rather than iconised: it has to rotate, and a rotating inline SVG
   inherits the header's 1.1rem sizing and ends up a different weight from the row icons. */
.af-drawer-account__group-title::after {
  width: 0.45rem;
  height: 0.45rem;
  margin-inline-start: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-0.1rem);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.af-drawer-account__group[open] > .af-drawer-account__group-title::after {
  transform: rotate(-135deg) translateY(-0.1rem);
}

.af-drawer-account__group[open] > .af-drawer-account__group-title {
  color: var(--af-header-ink);
}

.af-drawer-account__group-title .af-account-menu__badge {
  margin-inline-start: 0;
  letter-spacing: 0;
}

.af-drawer-account__group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-drawer-account__group a,
.af-drawer-account__logout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding-inline: 0.15rem;
  color: var(--af-header-ink);
  font-family: var(--af-font-ui);
  font-size: 1.05rem;
  text-decoration: none;
}

.af-drawer-account__logout {
  color: var(--af-header-muted);
  border-top: 1px solid var(--af-header-line);
}

.af-drawer-account__row-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--af-header-muted);
}

.af-drawer-account__doors {
  display: grid;
  gap: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .af-account-menu__panel,
  .af-drawer-account__group-title::after {
    transition-duration: 1ms;
  }
}
