/* =========================
   Admin bar
========================= */

:root {
  --admin-bar-height: 0px;
}

.admin-bar {
  --admin-bar-height: 32px;
}

@media (max-width: 782px) {
  .admin-bar {
    --admin-bar-height: 0px;
  }
}

/* =========================
   Header
========================= */

.site-header {
  position: sticky;
  top: var(--admin-bar-height);
  z-index: 9999;
  background: var(--white);
  transition:
    transform 0.4s var(--ease),
    opacity var(--duration-fast) var(--ease),
    background-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.site-header.is-shrunk {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu li a,
.menu li a:hover,
.menu li a:focus {
  text-transform: uppercase;
  color: var(--text-color);
  font-weight: 400;
  text-decoration: none;
}

/* A `parent-menu-item` is one button (label + chevron disc, register-menus.php)
   styled as a nav link. It keeps .submenu-toggle for header.js, so undo that
   class's chevron background + nudge on the button itself. */
.submenu-toggle.submenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-sm) / 2);
  padding: 0;
  border: 0;
  background: none;
  transform: none;
  color: var(--text-color);
  font-weight: 400;
  text-transform: uppercase;
  text-align: left;
}

/* =========================
   Logo
========================= */

.site-header .custom-logo-link,
.site-header.is-shrunk .custom-logo-link {
  display: inline-block;
  line-height: 0;
  width: var(--logo-size-shrunk);
  margin-top: var(--space-sm);
  transition:
    width var(--duration) var(--ease),
    opacity var(--duration) var(--ease);
}

/* While the drawer is open the header's logo would peek out under the
   backdrop, right beside the drawer's own copy — fade it so only one shows. */
body.menu-open .site-header .custom-logo-link {
  opacity: 0;
}

@media (min-width: 62rem) {
  .site-header .custom-logo-link {
    width: var(--logo-size);
    margin-top: var(--space-sm);
  }
}

.custom-logo {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   Top nav (HEADER)
========================= */

.site-header .top-nav {
  display: none;
}

@media (min-width: 62rem) {
  .site-header .top-nav {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity var(--duration-fast) var(--ease),
      transform var(--duration-fast) var(--ease);
  }

  .site-header.is-shrunk .top-nav {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
  }
}

.top-nav .button {
  min-height: 0;
  padding: 0.6rem 1rem;
  border-width: 1.5px;
}


/* =========================
   Collapsing search (HEADER)
========================= */

.header-search {
  display: flex;
  align-items: center;
}

.header-search .search-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Collapsed: input sits behind the disc, invisible and not focusable. */
.header-search .search-field input[type="search"] {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid transparent;
  border-radius: var(--br-rounded);
  background: var(--white);
  opacity: 0;
  cursor: pointer;
  transition:
    width var(--duration) var(--ease),
    opacity var(--duration-fast) var(--ease),
    padding var(--duration) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.header-search.is-expanded .search-field input[type="search"] {
  width: clamp(11rem, 20vw, 18rem);
  padding: 0 3rem 0 0.875rem;
  border-color: var(--grey-40) ;
  opacity: 1;
  cursor: text;
}

.header-search .search-field input[type="search"]:hover,
.header-search .search-field input[type="search"]:focus {
  border-color: var(--grey-40);
}

/* Disc + white magnifying glass — always visible, pinned to the right. */
.header-search .search-field .search-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--primary-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='21' y1='21' x2='15.5' y2='15.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.15rem;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease);
}

.header-search .search-field .search-toggle[aria-expanded="true"] {
  width: 2rem;
  height: 2rem;
  right: 5px;
}

.header-search .search-field .search-toggle:hover {
  background-color: var(--primary-80);
}

/* =========================
   Desktop nav
========================= */

.desktop-navigation {
  display: none;
}

@media (min-width: 62rem) {
  .nav-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: gap var(--duration) var(--ease);
  }

  .site-header.is-shrunk .nav-wrapper {
    gap: 0;
  }

  .desktop-navigation {
    display: flex;
    justify-content: flex-end;
  }

  .desktop-navigation .menu {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .desktop-navigation .menu li {
    margin: 0;
  }
}

/* =========================
   Toggle
   The hamburger is three white bars in a 45px primary disc (the close X the
   same) inside a 48px tap target. 45px is the third disc size, used
   only here — chevrons are 24px, every other drawer disc 36px. While
   the drawer is open header.js moves the button into the drawer's top row,
   where the bars cross into the close X — so it never moves on screen: both
   rows are the header's height and both sit a --space-md gutter in.
========================= */

.menu-toggle {
  position: relative;
  z-index: 10003;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  /* Round, so the global focus ring follows the disc. */
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

@media (min-width: 62rem) {
  .menu-toggle {
    display: none;
  }
}

/* The 45px disc (1.5px inside the 48px target). */
.menu-toggle::before {
  content: "";
  position: absolute;
  inset: 0.09375rem;
  border-radius: 50%;
  background: var(--primary-color);
  transition: background-color var(--duration-fast) var(--ease);
}

.menu-toggle:hover::before {
  background: var(--primary-80);
}

.menu-toggle span:not(.screen-reader-text) {
  position: absolute;
  width: 1.25rem;
  height: 3.75px;
  border-radius: var(--br-rounded);
  background: var(--white);
  transition:
    transform var(--duration) var(--ease),
    opacity var(--duration-fast) var(--ease);
}

.menu-toggle span:nth-child(2) {
  transform: translateY(-6.875px);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(0);
}

.menu-toggle span:nth-child(4) {
  transform: translateY(6.875px);
}

/* Crossed and stretched so the X spans 17.5px, like the close glyph in the design. */
.menu-toggle.is-open span:nth-child(2) {
  transform: rotate(45deg) scaleX(1.24);
}

.menu-toggle.is-open span:nth-child(3) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(4) {
  transform: rotate(-45deg) scaleX(1.24);
}

/* =========================
   Mobile menu (drawer, below 62rem)
   Top row (aside logo + the toggle) → full-width rows → search + Sign In,
   which stay pinned to the bottom (margin-top: auto) until an open accordion
   needs the room, when the drawer scrolls.
   Two text/disc lines run through it: text starts --space-lg in; discs
   (toggle, chevrons, search, Sign In) centre on the same line on the right.
   Discs come in three sizes: 24px chevrons, 45px toggle, 36px the rest.
========================= */

.site-navigation {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(90vw, 32rem);
  /* Above the WP admin bar (99999), which would otherwise cover the top row
     (logo + close) for logged-in users at the top of the page. */
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--secondary-10);
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity var(--duration) var(--ease),
    visibility var(--duration) var(--ease);
}

/* Visible at once on opening (no visibility transition this way): header.js
   hands focus back to the toggle as the drawer opens, and focus() fails on an
   element that is still visibility: hidden. Closing keeps the fade. */
.site-navigation.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition-property: transform, opacity;
}

/* Same height as the mobile header (logo + its --space-sm top margin), so the
   toggle lines up with where it sat in the header. */
.site-navigation__top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--logo-size-shrunk) * 433.91 / 679.89 + var(--space-sm));
  padding: 0 var(--space-md) 0 var(--space-lg);
}

/* The site logo (the_custom_logo) at the header's size and offset, its left
   edge on the --space-lg text line. */
.site-navigation__top .custom-logo-link {
  display: block;
  width: var(--logo-size-shrunk);
  margin-top: var(--space-sm);
  line-height: 0;
}

.site-navigation .menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The gap does the spacing — cancel the default list rhythm (typography.css
   gives .menu `li + li` a --space-md top margin). */
.site-navigation .menu > li + li {
  margin-top: 0;
}

.site-navigation .menu-item-has-children {
  gap: 0;
}

/* Top-level rows: full width, white, label in bold sentence case (the
   desktop nav keeps its uppercase). 48px tall at the least — a full tap target. */
.site-navigation .menu > li > a,
.site-navigation .menu > li > .submenu-trigger {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 3rem;
  padding: var(--space-sm) var(--space-lg);
  background: var(--white);
  font-family: var(--body-font);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
  color: var(--text-color);
  transition: color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
}

@media (hover: hover) {
  .site-navigation .menu > li > a:hover,
  .site-navigation .menu > li > .submenu-trigger:hover {
    color: var(--primary-color);
  }
}

/* The rows (and the promo card) run edge to edge in a scrolling panel, which
   clips anything outside it — pull the global focus ring inside them. */
.site-navigation .menu > li > a:focus-visible,
.site-navigation .menu > li > .submenu-trigger:focus-visible,
.site-navigation .mega-link:focus-visible,
.site-navigation a.mega-panel__heading:focus-visible,
.site-navigation .mega-promo:focus-visible {
  outline-offset: -2px;
}

/* A link + chevron parent (no `parent-menu-item` class): the chevron sits on
   the right of the row, on the disc line. */
.site-navigation .menu > .menu-item-has-children > .submenu-toggle.icon-circle {
  position: absolute;
  top: 0.75rem;
  right: var(--space-lg);
}

/* Drawer chevrons: a pale disc with a pink chevron (--primary-10: the chevron
   is ~4.4:1 on it).
   The data URI hard-codes --primary-color (#d2067c) — a URI can't read a
   custom property, so change it with the token. */
.site-navigation .menu > li .submenu-trigger__chevron.icon-circle,
.site-navigation .menu > .menu-item-has-children > .submenu-toggle.icon-circle {
  background-color: var(--primary-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d2067c' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* Open: pale pink row, pink label, and a marker down the left of the row AND
   its panel, so the open section's extent is clear. */
.site-navigation .menu > .is-open > a,
.site-navigation .menu > .is-open > .submenu-trigger {
  background: var(--primary-10);
  color: var(--primary-on-tint);
}

.site-navigation .menu > .menu-item-has-children.is-open::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--indicator-width);
  background: var(--primary-color);
  pointer-events: none;
}

.site-navigation .sub-menu .menu-item a {
  background-color: var(--grey-10);
}

/* =========================
   Top nav (INSIDE MENU) — search + Sign In, pinned to the bottom
========================= */

.site-navigation .top-nav {
  display: none;
}

.site-navigation.is-open .top-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
  padding: var(--space-lg) var(--space-md);
}

/* Drawer search — always expanded, full width, never collapses. Text is
   inset --space-md (as is Sign In's); the disc centres on the disc line. */
.site-navigation .header-search,
.site-navigation .header-search .search-field {
  width: 100%;
}

.site-navigation .header-search .search-field input[type="search"] {
  width: 100%;
  height: 3.125rem;
  padding: 0 3.5rem 0 calc(var(--space-md) - var(--border-width-sm));
  border: var(--border-width-sm) solid var(--grey-40);
  background: var(--white);
  opacity: 1;
  cursor: text;
}

.site-navigation .header-search .search-field input[type="search"]::placeholder {
  color: var(--grey-70);
  opacity: 1;
}

.site-navigation .header-search .search-field .search-toggle {
  width: 2.25rem;
  height: 2.25rem;
  right: 0.375rem;
}

/* Sign In: a .cta-button stretched to the search's size, its disc holding the
   external-link glyph (it opens Hive in a new tab). */
.site-navigation .site-navigation__sign-in {
  align-self: stretch;
  justify-content: space-between;
  min-height: 3.125rem;
  padding: 0 calc(0.375rem - var(--border-width)) 0 calc(var(--space-md) - var(--border-width));
  /* White at rest like every .cta-button — --primary-10 means "open" in the drawer. */
  background-color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
}

.site-navigation .site-navigation__sign-in:hover {
  background-color: var(--primary-20);
}

.site-navigation__sign-in .icon-rev {
  --icon-size: 2.25rem;
  flex-shrink: 0;
  color: var(--primary-color);
}

/* =========================
   Backdrop
========================= */

body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--overlay);
}

body.menu-open {
  overflow: hidden;
}

/* =========================
   Desktop reset
========================= */

@media (min-width: 62rem) {
  .site-navigation {
    display: none;
  }

  body.menu-open::before {
    display: none;
  }
}

/* =========================
   Dropdown handling
========================= */

.menu-item-has-children {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--space-sm) / 2);
}

.menu-item-has-children > a {
  flex: 1;
}

/* .submenu-toggle uses .icon-circle (elements.css) for the disc; chevron + bespoke size here.
   A parent-menu-item button's chevron (.submenu-trigger__chevron) is the same disc, inside it. */
.submenu-toggle,
.submenu-trigger__chevron {
  flex-shrink: 0;
  border: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  cursor: pointer;
  transform: translateY(-1px);
}

/* Compound specificity (0,2,0) keeps these sizes ahead of .icon-circle, which loads after this file. */
.submenu-toggle.icon-circle,
.submenu-trigger__chevron.icon-circle {
  width: 1.5rem;
  height: 1.5rem;
  background-size: 1rem;
}

.sub-menu {
  flex: 0 0 100%;
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.menu-item-has-children.is-open > .sub-menu {
  display: grid;
  gap: var(--space-sm);
  pointer-events: auto;
}

.sub-menu a {
  font-size: 1rem;
  line-height: 1rem;
}

.sub-menu .menu-item a,
.sub-menu .menu-item a:hover,
.sub-menu .menu-item a:focus {
  display: block;
  padding: var(--space-sm);
  white-space: nowrap;
  text-transform: initial;
}

.site-navigation.is-open .menu-item-has-children.is-open :is(.submenu-toggle.icon-circle, .submenu-trigger__chevron) {
  transform: rotate(-180deg);
  transition: transform var(--duration-fast) var(--ease);
}

/* =========================
   Desktop dropdown
========================= */

@media (min-width: 62rem) {
  .menu-item-has-children::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
  }

  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    max-height: 20rem;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .menu-item-has-children:hover > .submenu-toggle.icon-circle,
  .menu-item-has-children:focus-within > .submenu-toggle.icon-circle,
  .menu-item-has-children:hover > .submenu-trigger .submenu-trigger__chevron,
  .menu-item-has-children:focus-within > .submenu-trigger .submenu-trigger__chevron {
    animation: chevron-hop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes chevron-hop {
    0% { transform: translateY(0); }
    35% { transform: translateY(-3px); }
    65% { transform: translateY(3px); }
    100% { transform: translateY(0); }
  }

  .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: grid;
    margin: 0;
    max-width: calc(100vw - var(--space-md));
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition:
      max-height var(--duration) var(--ease),
      opacity var(--duration-fast) var(--ease),
      transform var(--duration-fast) var(--ease),
      visibility var(--duration-fast) var(--ease);
  }

  .submenu-toggle.icon-circle,
  .submenu-trigger__chevron.icon-circle {
    width: 1rem;
    height: 1rem;
    background-size: 0.75rem;
  }

  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-navigation .menu > li:last-child .sub-menu,
  .desktop-navigation .menu > li:last-child .sub-menu {
    left: auto;
    right: 0;
  }

  .sub-menu .menu-item {
    background: var(--white);
    transition: background-color 0.5s ease;
  }

  .sub-menu .menu-item a {
    color: var(--grey-80);
  }

  .sub-menu .menu-item:hover a,
  .sub-menu .menu-item:focus a {
    color: var(--text-color);
  }
}
/* =========================
   Mega menu
   Markup from WIBN_Nav_Walker (inc/functions/nav-walker.php): a top-level
   .mega-menu item whose panel is ul.mega-panel > li.mega-panel__col (sections)
   + li.mega-panel__promo. Mobile (drawer): sections stack inside the existing
   accordion. Desktop: one full-width panel under the header, opened by
   header.js (.is-open) — or by :hover/:focus-within if the script hasn't run.
========================= */

.mega-panel,
.mega-panel__sections,
.mega-panel__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-panel li {
  margin: 0;
}

.mega-panel {
  flex: 0 0 100%;
  display: none;
}

.site-navigation .menu-item-has-children.is-open > .mega-panel {
  display: grid;
}

.mega-panel__sections {
  display: grid;
  gap: var(--space-md);
}

.mega-panel__links {
  display: grid;
  gap: var(--space-md);
}

/* .menu li a sets uppercase/colour/weight on every nav link; the panel's own
   links opt back out (same specificity, later in the file). */
.menu .mega-panel li a,
.menu .mega-panel li a:hover,
.menu .mega-panel li a:focus {
  text-transform: none;
  text-decoration: none;
  color: var(--text-color);
}

.mega-panel__heading,
.menu .mega-panel li a.mega-panel__heading {
  display: block;
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--grey-20);
  line-height: 1.3;
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: var(--label-letter-spacing);
  color: var(--grey-80);
}

.mega-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.mega-link__icon {
  flex-shrink: 0;
  line-height: 0;
}

.mega-link__icon .icon-rev {
  --icon-size: 2.25rem;
}

.mega-link__icon--primary {
  color: var(--primary-color);
}

.mega-link__icon--secondary {
  color: var(--secondary-color);
}

.mega-link__text {
  display: grid;
  /* Small gap: the pair must still sit visibly closer than the gap between links. */
  gap: var(--space-xs);
}

.mega-link__title {
  font-family: var(--heading-font);
  font-size: var(--h4-h5-fs);
  line-height: var(--h4-h5-lh);
  font-weight: 600;
  transition: color var(--duration-fast) var(--ease);
}

/* Hover/focus only — the current page's link isn't highlighted. */
.mega-link:hover .mega-link__title,
.mega-link:focus-visible .mega-link__title {
  color: var(--primary-color);
}

.mega-link__desc {
  font-size: var(--font-sm);
  line-height: 1.4;
  color: var(--grey-80);
}

/* Promo card: image under a dark fade, copy + arrow disc pinned to the bottom. */
.mega-promo {
  position: relative;
  display: block;
  min-height: 10rem;
  height: 100%;
  overflow: hidden;
  border-radius: var(--br-md);
  background: var(--grey-80);
  isolation: isolate;
}

.mega-promo__img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
}

.mega-promo:hover .mega-promo__img,
.mega-promo:focus-visible .mega-promo__img {
  transform: scale(1.05);
}

.mega-promo__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-xs);
  height: 100%;
  min-height: inherit;
  padding: var(--space-md);
  /* --grey-100 at 80% behind the copy, easing out by 85% of the height. */
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--grey-100) 80%, transparent),
    color-mix(in srgb, var(--grey-100) 45%, transparent) 45%,
    transparent 85%
  );
  color: var(--white);
}

/* White disc with the diagonal arrow CUT OUT of it, so the photo shows through
   (the same idea as .cta-button__arrow). The arrow glyph (inc/svg/arrow.svg,
   pre-rotated to point up-right) is masked out of a full layer at the .icon-rev
   0.66 inset. Drawer + desktop panel alike. */
.mega-promo__arrow {
  --promo-arrow-size: 2.5rem;
  flex-shrink: 0;
  align-self: flex-end;
  width: var(--promo-arrow-size);
  height: var(--promo-arrow-size);
  border-radius: 50%;
  background-color: var(--white);
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15m-7-7 7 7-7 7' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' transform='rotate(-45 12 12)'/%3E%3C/svg%3E") center / 66% no-repeat,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15m-7-7 7 7-7 7' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' transform='rotate(-45 12 12)'/%3E%3C/svg%3E") center / 66% no-repeat exclude,
    linear-gradient(#000 0 0);
}

.mega-promo__heading {
  font-family: var(--heading-font);
  font-size: var(--h3-fs);
  line-height: var(--h3-lh);
  letter-spacing: var(--h3-ls);
  font-weight: 700;
}

.mega-promo__text {
  font-size: var(--font-sm);
  line-height: 1.4;
}

.menu .mega-panel li a.mega-promo,
.menu .mega-panel li a.mega-promo:hover,
.menu .mega-panel li a.mega-promo:focus {
  color: var(--white);
}

/* Drawer: the open panel runs straight on from its row — section headings
   sit on the drawer's grey, each link is its own translucent white row, and
   the promo card is full-bleed. Text stays on the --space-lg line. */
.site-navigation .mega-panel__sections {
  gap: 0;
}

.site-navigation .mega-panel__links {
  gap: var(--space-xs);
}

.site-navigation .mega-panel__heading,
.site-navigation .menu .mega-panel li a.mega-panel__heading {
  margin: 0;
  padding: var(--space-sm) var(--space-lg);
  border: 0;
  font-size: var(--font-xs);
  color: var(--grey-80);
}

.site-navigation .mega-link {
  padding: var(--space-sm) var(--space-lg);
  background: var(--white-50);
}

.site-navigation .mega-link__text {
  gap: 0;
}

.site-navigation .mega-link__title {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-color);
}

.site-navigation .mega-link:hover .mega-link__title,
.site-navigation .mega-link:focus-visible .mega-link__title {
  color: var(--primary-color);
}

/* In the drawer the promo card follows the panel's first column (Group
   meetings) — the main routes stay at the top, the offer lands before the
   rest. The walker writes it last, which is where the desktop panel keeps it. */
.site-navigation .mega-panel__promo {
  order: 1;
}

.site-navigation .mega-panel__col:not(:first-child) {
  order: 2;
}

.site-navigation .mega-promo {
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 1;
  border-radius: 0;
}

.site-navigation .mega-promo__body {
  padding: var(--space-sm) var(--space-lg);
}

/* Arrow in the bottom-right corner at the drawer's 36px disc size; the
   supporting line stops short of it. */
.site-navigation .mega-promo__arrow {
  --promo-arrow-size: 2.25rem;
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-sm);
}

.site-navigation .mega-promo__text {
  margin-right: calc(var(--promo-arrow-size, 2.25rem) + var(--space-sm));
}

/* Desktop: full-width panel under the header. */
@media (min-width: 62rem) {
  .site-header .container {
    position: relative;
  }

  /* Static so the panel positions against the header container, not the item.
     The dropdown hover bridge (::before) would then span the whole header. */
  .desktop-navigation .mega-menu {
    position: static;
  }

  .desktop-navigation .mega-menu::before {
    content: none;
  }

  .desktop-navigation .mega-menu > .submenu-toggle.icon-circle,
  .desktop-navigation .mega-menu .submenu-trigger__chevron {
    transition: transform var(--duration-fast) var(--ease);
  }

  .desktop-navigation .mega-menu:hover > .submenu-toggle.icon-circle,
  .desktop-navigation .mega-menu:focus-within > .submenu-toggle.icon-circle,
  .desktop-navigation .mega-menu:hover .submenu-trigger__chevron,
  .desktop-navigation .mega-menu:focus-within .submenu-trigger__chevron {
    animation: none;
  }

  .desktop-navigation .mega-menu.is-open > .submenu-toggle.icon-circle,
  .desktop-navigation .mega-menu.is-open .submenu-trigger__chevron {
    transform: translateY(-1px) rotate(180deg);
  }

  .desktop-navigation .mega-panel {
    position: absolute;
    top: 100%;
    right: 0;
    /* Right-aligned under the nav and sized to its content (as designed)
       rather than spanning the container; capped at the container width.
       In a max-content grid, 1fr columns all take the widest column's width. */
    width: max-content;
    max-width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    /* Hangs straight off the header's bottom edge — any gap shows a strip of
       page between header and panel, so it reads as detached from the nav. */
    margin-top: 0;
    overflow: hidden;
    /* Square top corners so it drops out of the header's edge; rounded below. */
    border-radius: 0 0 var(--br-md) var(--br-md);
    background: var(--white);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition:
      opacity var(--duration-fast) var(--ease),
      transform var(--duration-fast) var(--ease),
      visibility var(--duration-fast) var(--ease);
  }

  .desktop-navigation .mega-menu.is-open > .mega-panel,
  .desktop-navigation:not(.has-mega-js) .mega-menu:hover > .mega-panel,
  .desktop-navigation:not(.has-mega-js) .mega-menu:focus-within > .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .desktop-navigation .mega-panel__col {
    padding: var(--space-md);
  }

  /* Alternate columns sit on a light grey (half-strength --grey-10). */
  .desktop-navigation .mega-panel__col:nth-child(even) {
    background: color-mix(in srgb, var(--grey-10) 50%, var(--white));
  }

  /* More space above a stacked section heading than below its rule, so the
     heading reads as belonging to the links under it. */
  .desktop-navigation .mega-panel__sections {
    gap: var(--space-md);
  }

  /* Compact type for the narrower desktop panel (the drawer keeps the larger
     base sizes for touch). */
  /* Rule → first link stays tighter than the section gap above (see __sections). */
  .desktop-navigation .mega-panel__heading,
  .desktop-navigation .mega-panel li a.mega-panel__heading {
    margin-bottom: calc(var(--space-sm) * 1.5);
    font-size: var(--font-xs);
  }

  .desktop-navigation .mega-panel__links {
    gap: var(--space-sm);
  }

  /* Title + description pairs need more separation than single-line links. */
  .desktop-navigation .mega-panel__links:has(.mega-link__desc) {
    gap: var(--space-md);
  }

  /* Titles stay on one line (they set the column widths); descriptions wrap
     at a fixed measure so they don't stretch their column. */
  .desktop-navigation .mega-link__title {
    font-size: 1rem;
    line-height: 1.3;
    white-space: nowrap;
  }

  /* Featured links (with a description — In Person / Online) step up a
     little so they lead the panel: halfway between the 1rem link titles and
     the h4/h5 step (20px at these widths). */
  .desktop-navigation .mega-link:has(.mega-link__desc) .mega-link__title {
    font-size: 1.125rem;
  }

  /* Halfway between the 1.75rem it was and the 2.25rem mobile disc. */
  .desktop-navigation .mega-link__icon .icon-rev {
    --icon-size: 2rem;
  }

  .desktop-navigation .mega-link__desc {
    max-width: 9.5rem;
    font-size: var(--font-xs);
  }

  /* Take the promo copy out of flow so it doesn't size the columns (it would
     run on one line and win) — it wraps inside the width the links set. */
  .desktop-navigation .mega-promo__body {
    position: absolute;
    inset: 0;
    height: auto;
  }

  /* Full-bleed in the panel's last column; the panel clips the corners. */
  .desktop-navigation .mega-promo {
    min-height: 12rem;
    border-radius: 0;
  }

  .desktop-navigation .mega-promo__heading {
    font-size: var(--h4-h5-fs);
    line-height: var(--h4-h5-lh);
  }

  .desktop-navigation .mega-promo__text {
    font-size: var(--font-xs);
  }
}
