.gooey-nav {
  --gn-pad: 6px;
  --gn-gap: 4px;
  --gn-font: 14px;
  --gn-x: 16px;
  --gn-y: 9px;

  --gn-frame: rgba(245, 236, 226, 0.74);
  --gn-frame-edge: rgba(255, 255, 255, 0.75);
  --gn-frame-highlight: rgba(255, 255, 255, 0.65);
  --gn-frame-shadow: 0 8px 24px rgba(28, 23, 21, 0.1);
  --gn-ink: #1C1715;
  --gn-muted: #1C1715;
  --gn-pill: var(--yg-metal);
  --gn-active-ink: #1C1715;

  position: relative;
  display: inline-flex;
  max-width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--gn-font);
  line-height: 1.2;
  isolation: isolate;
}

.gooey-nav,
.gooey-nav * {
  box-sizing: border-box;
}

.gooey-nav--sm {
  --gn-pad: 5px;
  --gn-gap: 2px;
  --gn-font: 13px;
  --gn-x: 13px;
  --gn-y: 7px;
}

.gooey-nav--lg {
  --gn-pad: 7px;
  --gn-gap: 6px;
  --gn-font: 16px;
  --gn-x: 20px;
  --gn-y: 11px;
}

.gooey-nav--framed {
  padding: var(--gn-pad);
  border-radius: 999px;
  background: var(--gn-frame);
  box-shadow: var(--gn-frame-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
}

.gooey-nav__stage {
  position: relative;
  max-width: 100%;
  min-width: 0;
}

.gooey-nav__canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.gooey-nav__fallback {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  border-radius: 999px;
  background: var(--gn-pill);
  pointer-events: none;
}

.gooey-nav__list {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gn-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gooey-nav__list--active {
  position: absolute;
  inset: 0;
  color: var(--gn-active-ink);
  visibility: hidden;
  clip-path: inset(100%);
  pointer-events: none;
}

.gooey-nav__item {
  display: flex;
  min-width: 0;
}

.gooey-nav .gooey-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--gn-y) var(--gn-x);
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--gn-muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gooey-nav .gooey-nav__list--active .gooey-nav__link {
  color: inherit;
}

.gooey-nav__item[data-active] .gooey-nav__link {
  color: var(--gn-ink);
}

.gooey-nav .gooey-nav__link:focus-visible {
  outline: 2px solid var(--gn-ink);
  outline-offset: 2px;
}

.gooey-nav__icon {
  display: inline-flex;
  flex: none;
}

.gooey-nav__icon svg {
  width: 1.15em;
  height: 1.15em;
}

.gooey-nav__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--gn-frame-edge),
    inset 0 1px 0 var(--gn-frame-highlight);
  pointer-events: none;
}

/* Desktop: centred inside the hero's raised top section. */
.ebk-gooey {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translate(-50%, -50%) translateY(16px);
  pointer-events: auto;
}

/* Mobile: permanently visible inside the hero. */
@media (max-width: 700px) {
  .ebk-gooey {
    --gn-pad: 5px;
    --gn-gap: 2px;
    --gn-font: clamp(10px, 2.7vw, 13px);
    --gn-x: 5px;
    --gn-y: 8px;

    top: 22px;
    left: 50%;
    width: 66%;
    max-width: none;
    transform: translateX(-50%);
  }

  .ebk-gooey .gooey-nav__stage {
    width: 100%;
  }

  .ebk-gooey .gooey-nav__list {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ebk-gooey .gooey-nav__link {
    width: 100%;
  }
}

@media (hover: hover) {
  .gooey-nav .gooey-nav__link:hover {
    color: var(--gn-ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gooey-nav .gooey-nav__link {
    transition: none;
  }
}