.opening {
  position: relative;
}

.opening::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  right: 0;
  left: 0;
  height: 18px;
  background-image: url("assets/wave-green.svg");
  background-position: left top;
  background-repeat: round no-repeat;
  background-size: 44px 100%;
  pointer-events: none;
  content: "";
}

@media (max-width: 640px) {
  .opening::before {
    height: 15px;
    background-size: 38px 100%;
  }
}

.wave-action-band {
  --action-height: 56px;
  --action-gold: color-mix(in srgb, var(--gold) 29%, var(--cream));
  height: var(--action-height);
}

.wave-action-band .hero-actions {
  position: relative;
  align-items: center;
  width: 100%;
  height: var(--action-height);
  margin: 0;
  padding: 0 12px;
  border: 0;
  gap: 0;
  background: var(--cream);
}

.wave-action-band .hero-actions > :is(a, button) {
  display: inline-flex;
  flex: none;
  align-items: center;
  inline-size: min(144px, 50%);
  min-height: 44px;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wave-action-band .hero-actions > button {
  background: var(--green);
  border-color: var(--green);
  border-radius: 2px 0 0 2px;
  color: var(--action-gold);
}

.wave-action-band .hero-actions > button:hover {
  background: #3d5340;
}

.wave-action-band .hero-actions > a {
  background: var(--action-gold);
  border-color: var(--gold);
  border-left: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: inset -2px 0 var(--cream), inset 0 2px var(--cream), inset 0 -2px var(--cream);
  color: var(--green);
}

.wave-action-band .hero-actions > a:hover {
  background: color-mix(in srgb, var(--gold) 38%, var(--cream));
}

.wave-action-band .hero-actions > :is(a, button):focus-visible {
  z-index: 2;
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.wave-action-band .hero-actions.is-pinned {
  position: fixed;
  z-index: 29;
  inset: var(--action-top) 0 auto;
}

html.wave-actions-enabled {
  scroll-padding-top: var(--wave-header-clearance, 145px);
}

.travelling-wave {
  --wave-width: 44px;
  --wave-height: 18px;
  position: absolute;
  z-index: 1;
  inset: calc(100% - 1px) 0 auto;
  height: var(--wave-height);
  background: url("assets/wave-green.svg") repeat-x left top;
  background-size: var(--wave-width) 100%;
  pointer-events: none;
}

.hero-actions.is-pinned .travelling-wave {
  height: var(--pinned-height);
  background-size: var(--pinned-width) 100%;
}

.wave-travelling .opening::before {
  content: none;
}

.nav.wave-nav-active {
  box-shadow: none;
}

.nav.wave-nav-active ~ .reading-progress {
  display: none;
}

.nav.wave-joined {
  background-color: var(--cream);
}

@media (max-width: 640px) {
  .travelling-wave {
    --wave-width: 38px;
    --wave-height: 15px;
  }
}
